1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=thumb-eabi %s -o - | FileCheck %s
4 define i32 @test1(i32 %X) {
6 ; CHECK: @ %bb.0: @ %entry
7 ; CHECK-NEXT: lsrs r0, r0, #31
10 icmp slt i32 %X, 0 ; <i1>:0 [#uses=1]
11 zext i1 %0 to i32 ; <i32>:1 [#uses=1]
15 define i32 @test2(i32 %X) {
17 ; CHECK: @ %bb.0: @ %entry
18 ; CHECK-NEXT: movs r1, #1
19 ; CHECK-NEXT: lsls r1, r1, #31
20 ; CHECK-NEXT: adds r0, r0, r1
23 %tmp1 = sub i32 %X, 2147483648