[llvm] [CodeGen] Add preliminary plumbing for `samesign` flag (PR #112354)
    via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Oct 18 10:49:48 PDT 2024
    
    
  
================
@@ -1716,8 +1717,13 @@ bool TargetLowering::SimplifyDemandedBits(
       // if we don't care about FP signed-zero. The use of SETLT with FP means
       // that we don't care about NaNs.
       if (CC == ISD::SETLT && Op1.getValueType().isInteger() &&
-          (isNullConstant(Op1) || ISD::isBuildVectorAllZeros(Op1.getNode())))
+          (isNullConstant(Op1) || ISD::isBuildVectorAllZeros(Op1.getNode()))) {
+        if (Flags.hasSameSign()) {
+          Flags.setSameSign(false);
+          Op->setFlags(Flags);
----------------
goldsteinn wrote:
This doesn't seem necessary for the plumbing and its not clear its correct to propagate the rest of the flags.
https://github.com/llvm/llvm-project/pull/112354
    
    
More information about the llvm-commits
mailing list