[llvm] [SCEVExp] Use Builder.CreateBinOp in InsertBinOp. (PR #154148)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 19 05:53:34 PDT 2025


================
@@ -1722,6 +1722,19 @@ class IRBuilderBase {
     return Insert(BinOp, Name);
   }
 
+  Value *CreateBinOpNoWrapFlags(Instruction::BinaryOps Opc, Value *LHS,
+                                Value *RHS, bool IsNUW, bool IsNSW,
+                                const Twine &Name = "") {
+    if (Value *V = Folder.FoldBinOp(Opc, LHS, RHS))
----------------
nikic wrote:

Should use FoldNoWrapBinOp here.

https://github.com/llvm/llvm-project/pull/154148


More information about the llvm-commits mailing list