[BPI] Avoid ConstantExpr::get()
Use ConstantFoldBinaryOpOperands() instead, to prepare for the case where not all binary operators have a constant expression form. I believe this code actually intended to set OnlyIfReduced=true, however ConstantExpr::get() actually accepts a Flags argument at that position (and OnlyIfReducedTy as the next argument), so this ended up creating a constant expression with some random flag (probably exact or nuw depending on which).
Loading
Please sign in to comment