1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=x86_64-- < %s | FileCheck %s
5 %0 = type { i32, i8, [35 x i8] }
7 @g_144 = external global %0, align 8 ; <%0*> [#uses=1]
9 define i32 @int87(i32 %uint64p_8, i1 %cond) nounwind {
11 ; CHECK: # %bb.0: # %entry
12 ; CHECK-NEXT: movq g_144+{{.*}}(%rip), %rax
13 ; CHECK-NEXT: movq g_144+{{.*}}(%rip), %rdx
14 ; CHECK-NEXT: movzbl %sil, %ecx
15 ; CHECK-NEXT: shll $6, %ecx
16 ; CHECK-NEXT: .p2align 4, 0x90
17 ; CHECK-NEXT: .LBB0_1: # %for.cond
18 ; CHECK-NEXT: # =>This Inner Loop Header: Depth=1
19 ; CHECK-NEXT: movq %rdx, %rsi
20 ; CHECK-NEXT: shrdq %cl, %rax, %rsi
21 ; CHECK-NEXT: testb $64, %cl
22 ; CHECK-NEXT: cmovneq %rax, %rsi
23 ; CHECK-NEXT: orl $0, %esi
24 ; CHECK-NEXT: je .LBB0_1
25 ; CHECK-NEXT: # %bb.2: # %if.then
26 ; CHECK-NEXT: movl $1, %eax
29 %srcval4 = load i320, i320* bitcast (%0* @g_144 to i320*), align 8 ; <i320> [#uses=1]
32 for.cond: ; preds = %for.cond, %entry
33 %call3.in.in.in.v = select i1 %cond, i320 192, i320 128 ; <i320> [#uses=1]
34 %call3.in.in.in = lshr i320 %srcval4, %call3.in.in.in.v ; <i320> [#uses=1]
35 %call3.in = trunc i320 %call3.in.in.in to i32 ; <i32> [#uses=1]
36 %tobool = icmp eq i32 %call3.in, 0 ; <i1> [#uses=1]
37 br i1 %tobool, label %for.cond, label %if.then
39 if.then: ; preds = %for.cond