• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -march=x86-64 | FileCheck %s
2
3	%struct.bf = type { i64, i16, i16, i32 }
4@bfi = common global %struct.bf zeroinitializer, align 16
5
6define void @t1() nounwind optsize ssp {
7entry:
8	%0 = load i32, i32* bitcast (i16* getelementptr (%struct.bf, %struct.bf* @bfi, i32 0, i32 1) to i32*), align 8
9	%1 = or i32 %0, 65536
10	store i32 %1, i32* bitcast (i16* getelementptr (%struct.bf, %struct.bf* @bfi, i32 0, i32 1) to i32*), align 8
11	ret void
12
13; CHECK-LABEL: t1:
14; CHECK: orb $1
15; CHECK-NEXT: ret
16}
17
18define void @t2() nounwind optsize ssp {
19entry:
20	%0 = load i32, i32* bitcast (i16* getelementptr (%struct.bf, %struct.bf* @bfi, i32 0, i32 1) to i32*), align 8
21	%1 = or i32 %0, 16842752
22	store i32 %1, i32* bitcast (i16* getelementptr (%struct.bf, %struct.bf* @bfi, i32 0, i32 1) to i32*), align 8
23	ret void
24
25; CHECK-LABEL: t2:
26; CHECK: orl $16842752
27; CHECK-NEXT: ret
28}
29