[AMDGPU] Add True16 register classes.
[llvm-project.git] / llvm / test / Transforms / SafeStack / X86 / sink-to-use.ll
blob1a7984a7c04a08ded9f49234748d4dd19ac7e555
1 ; Test that unsafe alloca address calculation is done immediately before each use.
2 ; RUN: opt -safe-stack -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s
3 ; RUN: opt -safe-stack -S -mtriple=i386-pc-linux-gnu < %s -o - | FileCheck %s
5 define void @f() safestack {
6 entry:
7   %x0 = alloca i32, align 4
8   %x1 = alloca i32, align 4
10 ; CHECK: %[[A:.*]] = getelementptr i8, ptr %{{.*}}, i32 -4
11 ; CHECK: call void @use(ptr %[[A]])
12   call void @use(ptr %x0)
14 ; CHECK: %[[B:.*]] = getelementptr i8, ptr %{{.*}}, i32 -8
15 ; CHECK: call void @use(ptr %[[B]])
16   call void @use(ptr %x1)
17   ret void
20 declare void @use(ptr)