1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-- | FileCheck %s
4 %struct.bf = type { i64, i16, i16, i32 }
5 @bfi = common dso_local global %struct.bf zeroinitializer, align 16
7 define dso_local void @t1() nounwind optsize ssp {
9 ; CHECK: # %bb.0: # %entry
10 ; CHECK-NEXT: orb $1, bfi+10(%rip)
13 %0 = load i32, ptr getelementptr (%struct.bf, ptr @bfi, i32 0, i32 1), align 8
15 store i32 %1, ptr getelementptr (%struct.bf, ptr @bfi, i32 0, i32 1), align 8
19 define dso_local void @t1_noalign() nounwind optsize ssp {
20 ; CHECK-LABEL: t1_noalign:
21 ; CHECK: # %bb.0: # %entry
22 ; CHECK-NEXT: orb $1, bfi+10(%rip)
25 %0 = load i32, ptr getelementptr (%struct.bf, ptr @bfi, i32 0, i32 1), align 1
27 store i32 %1, ptr getelementptr (%struct.bf, ptr @bfi, i32 0, i32 1), align 1
31 define dso_local void @t2() nounwind optsize ssp {
33 ; CHECK: # %bb.0: # %entry
34 ; CHECK-NEXT: orl $16842752, bfi+8(%rip) # imm = 0x1010000
37 %0 = load i32, ptr getelementptr (%struct.bf, ptr @bfi, i32 0, i32 1), align 8
38 %1 = or i32 %0, 16842752
39 store i32 %1, ptr getelementptr (%struct.bf, ptr @bfi, i32 0, i32 1), align 8