1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-unknown-unknown | FileCheck %s --check-prefix=X86
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s --check-prefix=X64
5 define i32 @PR15705(i32 %x, i32 %a, i32 %b, i32 %c) #0 {
7 ; X86: # %bb.0: # %entry
8 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
9 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
10 ; X86-NEXT: movl {{[0-9]+}}(%esp), %edx
11 ; X86-NEXT: cmpl %ecx, %edx
12 ; X86-NEXT: je .LBB0_4
13 ; X86-NEXT: # %bb.1: # %if.end
14 ; X86-NEXT: cmpl %eax, %edx
15 ; X86-NEXT: jne .LBB0_3
17 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
18 ; X86-NEXT: .LBB0_3: # %if.end
19 ; X86-NEXT: movl %ecx, %eax
20 ; X86-NEXT: .LBB0_4: # %return
24 ; X64: # %bb.0: # %entry
25 ; X64-NEXT: movl %edx, %eax
26 ; X64-NEXT: cmpl %esi, %edi
27 ; X64-NEXT: je .LBB0_2
28 ; X64-NEXT: # %bb.1: # %if.end
29 ; X64-NEXT: cmpl %eax, %edi
30 ; X64-NEXT: cmovel %ecx, %esi
31 ; X64-NEXT: movl %esi, %eax
32 ; X64-NEXT: .LBB0_2: # %return
35 %cmp = icmp eq i32 %x, %a
36 br i1 %cmp, label %return, label %if.end
39 %cmp1 = icmp eq i32 %x, %b
40 %c.a = select i1 %cmp1, i32 %c, i32 %a
44 %retval.0 = phi i32 [ %b, %entry ], [ %c.a, %if.end ]
48 attributes #0 = { nounwind readnone ssp "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-frame-pointer-elim-non-leaf"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }