Skip to content

Commit 9a32b14

Browse files
committed
DAG: exp opcodes cannotBeOrderedNegativeFP
1 parent 074308c commit 9a32b14

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6233,7 +6233,17 @@ bool SelectionDAG::cannotBeOrderedNegativeFP(SDValue Op) const {
62336233
if (ConstantFPSDNode *C1 = isConstOrConstSplatFP(Op, true))
62346234
return !C1->isNegative();
62356235

6236-
return Op.getOpcode() == ISD::FABS;
6236+
switch (Op.getOpcode()) {
6237+
case ISD::FABS:
6238+
case ISD::FEXP:
6239+
case ISD::FEXP2:
6240+
case ISD::FEXP10:
6241+
return true;
6242+
default:
6243+
return false;
6244+
}
6245+
6246+
llvm_unreachable("covered opcode switch");
62376247
}
62386248

62396249
bool SelectionDAG::isEqualTo(SDValue A, SDValue B) const {

0 commit comments

Comments
 (0)