[llvm] fd452da - [X86] constant-hoisting-cmp.ll - regenerate test checks

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 4 09:28:20 PDT 2025


Author: Simon Pilgrim
Date: 2025-06-04T17:28:05+01:00
New Revision: fd452da64d548a9aea97a0b5be10962a0e58d925

URL: https://github.com/llvm/llvm-project/commit/fd452da64d548a9aea97a0b5be10962a0e58d925
DIFF: https://github.com/llvm/llvm-project/commit/fd452da64d548a9aea97a0b5be10962a0e58d925.diff

LOG: [X86] constant-hoisting-cmp.ll - regenerate test checks

Added: 
    

Modified: 
    llvm/test/CodeGen/X86/constant-hoisting-cmp.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/X86/constant-hoisting-cmp.ll b/llvm/test/CodeGen/X86/constant-hoisting-cmp.ll
index b90080003dd09..c11dfe5c11c0d 100644
--- a/llvm/test/CodeGen/X86/constant-hoisting-cmp.ll
+++ b/llvm/test/CodeGen/X86/constant-hoisting-cmp.ll
@@ -1,15 +1,31 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
 ; RUN: llc < %s -O3 -mtriple=x86_64-- |FileCheck %s
-define i64 @foo(i64 %data1, i64 %data2, i64 %data3)
-{
+
 ; If constant 4294967295 is hoisted to a variable, then we won't be able to
 ; use a shift right by 32 to optimize the compare.
+define i64 @foo(i64 %data1, i64 %data2, i64 %data3) {
+; CHECK-LABEL: foo:
+; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    movq %rdx, %rax
+; CHECK-NEXT:    shrq $32, %rdi
+; CHECK-NEXT:    je .LBB0_2
+; CHECK-NEXT:  # %bb.1:
+; CHECK-NEXT:    incq %rax
+; CHECK-NEXT:    retq
+; CHECK-NEXT:  .LBB0_2: # %L_val2
+; CHECK-NEXT:    shrq $32, %rsi
+; CHECK-NEXT:    je .LBB0_4
+; CHECK-NEXT:  # %bb.3:
+; CHECK-NEXT:    addq $2, %rax
+; CHECK-NEXT:    retq
+; CHECK-NEXT:  .LBB0_4: # %L_val3
+; CHECK-NEXT:    addq $3, %rax
+; CHECK-NEXT:    retq
 entry:
   %val1 = add i64 %data3, 1
   %x = icmp ugt i64 %data1, 4294967295
   br i1 %x, label %End, label %L_val2
 
-; CHECK: shrq    $32, {{.*}}
-; CHECK: shrq    $32, {{.*}}
 L_val2:
   %val2 = add i64 %data3, 2
   %y = icmp ugt i64 %data2, 4294967295


        


More information about the llvm-commits mailing list