1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
2 ; RUN: opt < %s -passes=infer-alignment -S | FileCheck %s
4 define void @load_volatile() {
5 ; CHECK-LABEL: define void @load_volatile() {
6 ; CHECK-NEXT: [[A:%.*]] = alloca { i32 }, align 8
7 ; CHECK-NEXT: [[B:%.*]] = alloca i32, align 4
8 ; CHECK-NEXT: [[LOAD_A:%.*]] = load volatile i32, ptr [[A]], align 8
9 ; CHECK-NEXT: [[LOAD_B:%.*]] = load volatile i32, ptr [[B]], align 4
10 ; CHECK-NEXT: ret void
14 %load.a = load volatile i32, ptr %a
15 %load.b = load volatile i32, ptr %b
19 define void @store_volatile() {
20 ; CHECK-LABEL: define void @store_volatile() {
21 ; CHECK-NEXT: [[A:%.*]] = alloca { i32 }, align 8
22 ; CHECK-NEXT: [[B:%.*]] = alloca i32, align 4
23 ; CHECK-NEXT: store volatile i32 123, ptr [[A]], align 8
24 ; CHECK-NEXT: store volatile i32 123, ptr [[B]], align 4
25 ; CHECK-NEXT: ret void
29 store volatile i32 123, ptr %a
30 store volatile i32 123, ptr %b