[PATCH] D60061: [InstCombine] ssubo X, C -> saddo X, -C
    Roman Lebedev via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Apr  9 08:49:03 PDT 2019
    
    
  
lebedev.ri accepted this revision.
lebedev.ri added a comment.
This revision is now accepted and ready to land.
LG.
@nikic ?
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:2155
+    if (match(Arg1, m_Constant(C)) && C->isNotMinSignedValue()) {
+      // Create a copy of the original constant and negate it.
+      Value *NegVal = ConstantExpr::getNeg(C);
----------------
This does not create a //copy// of the original constant though, it just negates it.
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60061/new/
https://reviews.llvm.org/D60061
    
    
More information about the llvm-commits
mailing list