Home | History | Annotate | Download | only in X86
      1 ; RUN: llc < %s -march=x86 | FileCheck %s
      2 
      3 define i32 @test(i32* %X, i32 %B) {
      4 ; CHECK: test:
      5 ; CHECK-NOT: ret
      6 ; CHECK-NOT: lea
      7 ; CHECK: mov{{.}} $4, ({{.*}},{{.*}},4)
      8 ; CHECK: ret
      9 ; CHECK: mov{{.}} ({{.*}},{{.*}},4),
     10 ; CHECK: ret
     11 
     12 	; This gep should be sunk out of this block into the load/store users.
     13 	%P = getelementptr i32* %X, i32 %B
     14 	%G = icmp ult i32 %B, 1234
     15 	br i1 %G, label %T, label %F
     16 T:
     17 	store i32 4, i32* %P
     18 	ret i32 141
     19 F:
     20 	%V = load i32* %P
     21 	ret i32 %V
     22 }
     23