[llvm] [LLVM] Remove nuw neg (PR #86295)
    Yingwei Zheng via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Mar 22 09:23:10 PDT 2024
    
    
  
================
@@ -4250,10 +4250,11 @@ static Instruction *canonicalizeAbs(BinaryOperator &Xor,
     // xor (add A, Op1), Op1  ; add -1 and flip bits if negative
     // --> (A < 0) ? -A : A
     Value *IsNeg = Builder.CreateIsNeg(A);
-    // Copy the nuw/nsw flags from the add to the negate.
+    // Copy the nsw flags from the add to the negate.
     auto *Add = cast<BinaryOperator>(Op0);
-    Value *NegA = Builder.CreateNeg(A, "", Add->hasNoUnsignedWrap(),
-                                   Add->hasNoSignedWrap());
+    Value *NegA = Add->hasNoUnsignedWrap()
----------------
dtcxzyw wrote:
I don't know if it is OK to drop these changes and leave the regression.
https://github.com/llvm/llvm-project/pull/86295
    
    
More information about the llvm-commits
mailing list