49 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=i686-unknown-unknown | FileCheck %s --check-prefix=X863; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s --check-prefix=X644 5define i32 @PR15705(i32 %x, i32 %a, i32 %b, i32 %c) #0 {6; X86-LABEL: PR15705:7; X86: # %bb.0: # %entry8; X86-NEXT: movl {{[0-9]+}}(%esp), %eax9; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx10; X86-NEXT: movl {{[0-9]+}}(%esp), %edx11; X86-NEXT: cmpl %ecx, %edx12; X86-NEXT: je .LBB0_413; X86-NEXT: # %bb.1: # %if.end14; X86-NEXT: cmpl %eax, %edx15; X86-NEXT: jne .LBB0_316; X86-NEXT: # %bb.2:17; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx18; X86-NEXT: .LBB0_3: # %if.end19; X86-NEXT: movl %ecx, %eax20; X86-NEXT: .LBB0_4: # %return21; X86-NEXT: retl22;23; X64-LABEL: PR15705:24; X64: # %bb.0: # %entry25; X64-NEXT: movl %edx, %eax26; X64-NEXT: cmpl %esi, %edi27; X64-NEXT: je .LBB0_228; X64-NEXT: # %bb.1: # %if.end29; X64-NEXT: cmpl %eax, %edi30; X64-NEXT: cmovel %ecx, %esi31; X64-NEXT: movl %esi, %eax32; X64-NEXT: .LBB0_2: # %return33; X64-NEXT: retq34entry:35 %cmp = icmp eq i32 %x, %a36 br i1 %cmp, label %return, label %if.end37 38if.end:39 %cmp1 = icmp eq i32 %x, %b40 %c.a = select i1 %cmp1, i32 %c, i32 %a41 br label %return42 43return:44 %retval.0 = phi i32 [ %b, %entry ], [ %c.a, %if.end ]45 ret i32 %retval.046}47 48attributes #0 = { nounwind readnone ssp "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "use-soft-float"="false" }49