Skip to content

Commit 4f40dfc

Browse files
[IR] Remove the possibility of ConstantExpr having fast-math flags. (#94507)
This possibility was added in https://reviews.llvm.org/D34303 to resolve some assertion failures with cases where FP math operations got constant-folded in constant expressions. However, at no point did the IR representation allow for expressing fast-math flags on constant expressions. With the change of #93038, there are no longer any constant expressions capable of being FP math operators, and thus FPMathOperator can go back to being Instruction-only.
1 parent 0559eaf commit 4f40dfc

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

llvm/include/llvm/IR/Operator.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,6 @@ class FPMathOperator : public Operator {
330330
unsigned Opcode;
331331
if (auto *I = dyn_cast<Instruction>(V))
332332
Opcode = I->getOpcode();
333-
else if (auto *CE = dyn_cast<ConstantExpr>(V))
334-
Opcode = CE->getOpcode();
335333
else
336334
return false;
337335

0 commit comments

Comments
 (0)