[llvm] [X86] Try to shrink signed i64 compares if the input has enough one bits (PR #149719)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 23 08:31:17 PDT 2025


================
@@ -23489,6 +23488,16 @@ static SDValue EmitCmp(SDValue Op0, SDValue Op1, X86::CondCode X86CC,
     Op1 = DAG.getNode(ISD::TRUNCATE, dl, CmpVT, Op1);
   }
 
+  // Try to shrink signed i64 compares if the input has enough one bits.
+  // Or the input is sign extended from a 32-bit value.
----------------
RKSimon wrote:

This might be better: "Try to shrink signed i64 compares if the inputs are representable as signed i32."

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


More information about the llvm-commits mailing list