summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/CBackend/2008-02-01-UnalignedLoadStore.ll
blob: 269126d7598379d25a3bc7a950c5f32ad4efd690 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
; RUN: llvm-as < %s | llc -march=c | \
; RUN:          grep {struct __attribute__ ((packed, aligned(} | count 4

define void @test(i32* %P) {
        %X = load i32* %P, align 1
        store i32 %X, i32* %P, align 1
        ret void
}

define void @test2(i32* %P) {
        %X = volatile load i32* %P, align 2
        volatile store i32 %X, i32* %P, align 2
        ret void
}

OpenPOWER on IntegriCloud