; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
; RUN: llc -mtriple=i386-linux-gnu -mattr=+cmov,+ndd < %s | FileCheck %s
define i32 @test(i1 %cmp, i32 %x, i32 %y) nounwind {
; CHECK-LABEL: test:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: testb $1, {{[0-9]+}}(%esp)
; CHECK-NEXT: leal {{[0-9]+}}(%esp), %eax
; CHECK-NEXT: leal {{[0-9]+}}(%esp), %ecx
; CHECK-NEXT: cmovnel %eax, %ecx
; CHECK-NEXT: movl (%ecx), %eax
; CHECK-NEXT: retl
entry:
%cmov = select i1 %cmp, i32 %x, i32 %y
ret i32 %cmov
}