File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2+ ; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu | FileCheck %s
3+
4+ define i32 @pr152630 (i1 %cond ) nounwind {
5+ ; CHECK-LABEL: pr152630:
6+ ; CHECK: # %bb.0: # %entry
7+ ; CHECK-NEXT: andl $1, %edi
8+ ; CHECK-NEXT: decl %edi
9+ ; CHECK-NEXT: cmpl $255, %edi
10+ ; CHECK-NEXT: je .LBB0_2
11+ ; CHECK-NEXT: # %bb.1: # %entry
12+ ; CHECK-NEXT: movzbl %dil, %eax
13+ ; CHECK-NEXT: testl %eax, %eax
14+ ; CHECK-NEXT: jne .LBB0_3
15+ ; CHECK-NEXT: .LBB0_2: # %if.then
16+ ; CHECK-NEXT: xorl %eax, %eax
17+ ; CHECK-NEXT: retq
18+ ; CHECK-NEXT: .LBB0_3: # %if.else
19+ ; CHECK-NEXT: movl $1, %eax
20+ ; CHECK-NEXT: retq
21+ entry:
22+ %sel = select i1 %cond , i32 0 , i32 -1
23+ %conv = trunc nsw i32 %sel to i8
24+ switch i8 %conv , label %if.else [
25+ i8 -1 , label %if.then
26+ i8 0 , label %if.then
27+ ]
28+
29+ if.then:
30+ ret i32 0
31+
32+ if.else:
33+ ret i32 1
34+ }
You can’t perform that action at this time.
0 commit comments