1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-- -x86-asm-syntax=intel | FileCheck %s
6 define i64 @foo(i64 %x, ptr %X) {
10 ; CHECK-NEXT: .cfi_def_cfa_offset 8
11 ; CHECK-NEXT: .cfi_offset esi, -8
12 ; CHECK-NEXT: mov esi, dword ptr [esp + 8]
13 ; CHECK-NEXT: mov edx, dword ptr [esp + 12]
14 ; CHECK-NEXT: mov eax, dword ptr [esp + 16]
15 ; CHECK-NEXT: movzx ecx, byte ptr [eax]
16 ; CHECK-NEXT: mov eax, esi
17 ; CHECK-NEXT: shl eax, cl
18 ; CHECK-NEXT: shld edx, esi, cl
19 ; CHECK-NEXT: test cl, 32
20 ; CHECK-NEXT: je .LBB0_2
21 ; CHECK-NEXT: # %bb.1:
22 ; CHECK-NEXT: mov edx, eax
23 ; CHECK-NEXT: xor eax, eax
24 ; CHECK-NEXT: .LBB0_2:
26 ; CHECK-NEXT: .cfi_def_cfa_offset 4
28 %tmp.1 = load i64, ptr %X ; <i64> [#uses=1]
29 %tmp.3 = trunc i64 %tmp.1 to i8 ; <i8> [#uses=1]
30 %shift.upgrd.1 = zext i8 %tmp.3 to i64 ; <i64> [#uses=1]
31 %tmp.4 = shl i64 %x, %shift.upgrd.1 ; <i64> [#uses=1]