xref: /llvm-project/llvm/test/CodeGen/X86/ispositive.ll (revision 584ed8822631481ced8d3574cc1fed1585aed77d)
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=i686-- | FileCheck %s
3
4define i32 @test1(i32 %X) {
5; CHECK-LABEL: test1:
6; CHECK:       # %bb.0: # %entry
7; CHECK-NEXT:    movl {{[0-9]+}}(%esp), %eax
8; CHECK-NEXT:    shrl $31, %eax
9; CHECK-NEXT:    retl
10entry:
11        icmp slt i32 %X, 0              ; <i1>:0 [#uses=1]
12        zext i1 %0 to i32               ; <i32>:1 [#uses=1]
13        ret i32 %1
14}
15
16