1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc < %s -relocation-model=static -mtriple=i686-unknown-unknown | FileCheck %s 3 4; This should produce two shll instructions, not any lea's. 5 6target triple = "i686-apple-darwin8" 7@Y = weak global i32 0 8@X = weak global i32 0 9 10define void @fn1() { 11; CHECK-LABEL: fn1: 12; CHECK: # %bb.0: 13; CHECK-NEXT: movl Y, %eax 14; CHECK-NEXT: shll $3, %eax 15; CHECK-NEXT: orl %eax, X 16; CHECK-NEXT: retl 17 %tmp = load i32, i32* @Y 18 %tmp1 = shl i32 %tmp, 3 19 %tmp2 = load i32, i32* @X 20 %tmp3 = or i32 %tmp1, %tmp2 21 store i32 %tmp3, i32* @X 22 ret void 23} 24 25define i32 @fn2(i32 %X, i32 %Y) { 26; CHECK-LABEL: fn2: 27; CHECK: # %bb.0: 28; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax 29; CHECK-NEXT: shll $3, %eax 30; CHECK-NEXT: orl {{[0-9]+}}(%esp), %eax 31; CHECK-NEXT: retl 32 %tmp2 = shl i32 %Y, 3 33 %tmp4 = or i32 %tmp2, %X 34 ret i32 %tmp4 35} 36 37