1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s | FileCheck %s
4 target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"
5 target triple = "i386-unknown-linux-gnu"
7 @b = global i16 0, align 4
11 ; CHECK: # %bb.0: # %entry
12 ; CHECK-NEXT: xorl %eax, %eax
13 ; CHECK-NEXT: testb %al, %al
14 ; CHECK-NEXT: jne .LBB0_3
15 ; CHECK-NEXT: # %bb.1: # %go
16 ; CHECK-NEXT: movl $-1, %ecx
17 ; CHECK-NEXT: movsbl b, %edx
18 ; CHECK-NEXT: notl %ecx
19 ; CHECK-NEXT: movzwl %dx, %edx
20 ; CHECK-NEXT: cmpl $-1, %edx
21 ; CHECK-NEXT: sbbl %ecx, %eax
22 ; CHECK-NEXT: jge .LBB0_3
23 ; CHECK-NEXT: # %bb.2: # %if.then
24 ; CHECK-NEXT: movl $42, %eax
26 ; CHECK-NEXT: .LBB0_3: # %if.else
27 ; CHECK-NEXT: xorl %eax, %eax
30 %true = icmp eq i32 0, 0
31 %const = bitcast i64 -4294967296 to i64
32 br i1 %true, label %go, label %if.else
35 %b = load i16, i16* @b, align 4
37 %conv = ashr i16 %sext, 8
38 %neg4 = xor i64 %const, -1
39 %conv5 = zext i16 %conv to i64
40 %cmp = icmp slt i64 %conv5, %neg4
41 br i1 %cmp, label %if.then, label %if.else