37 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -relocation-model=static -mtriple=i686-unknown-unknown | FileCheck %s3 4; This should produce two shll instructions, not any lea's.5 6target triple = "i686-apple-darwin8"7@Y = weak global i32 08@X = weak global i32 09 10define void @fn1() {11; CHECK-LABEL: fn1:12; CHECK: # %bb.0:13; CHECK-NEXT: movl Y, %eax14; CHECK-NEXT: shll $3, %eax15; CHECK-NEXT: orl %eax, X16; CHECK-NEXT: retl17 %tmp = load i32, ptr @Y18 %tmp1 = shl i32 %tmp, 319 %tmp2 = load i32, ptr @X20 %tmp3 = or i32 %tmp1, %tmp221 store i32 %tmp3, ptr @X22 ret void23}24 25define i32 @fn2(i32 %X, i32 %Y) {26; CHECK-LABEL: fn2:27; CHECK: # %bb.0:28; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax29; CHECK-NEXT: shll $3, %eax30; CHECK-NEXT: orl {{[0-9]+}}(%esp), %eax31; CHECK-NEXT: retl32 %tmp2 = shl i32 %Y, 333 %tmp4 = or i32 %tmp2, %X34 ret i32 %tmp435}36 37