Chromium Code Reviews| Index: test/NaCl/X86/dynamic-stack-alloc2.ll |
| diff --git a/test/NaCl/X86/dynamic-stack-alloc2.ll b/test/NaCl/X86/dynamic-stack-alloc2.ll |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..791a1555d71086ec4454ad56143b75a211571f11 |
| --- /dev/null |
| +++ b/test/NaCl/X86/dynamic-stack-alloc2.ll |
| @@ -0,0 +1,31 @@ |
| +; RUN: llc -mtriple=x86_64-nacl %s -o - | FileCheck %s |
| + |
| +; CHECK-LABEL: @foo |
|
jvoung (off chromium)
2015/05/12 23:53:05
nit: seems better to put this by the function (at
Derek Schuff
2015/05/13 00:44:50
Done.
|
| +; CHECK: .bundle_lock |
| +; CHECK: leal -16({{.*}}), %esp |
| +; CHECK: addq %r15, %rsp |
| +; CHECK: .bundle_unlock |
| + |
| +target datalayout = "e-p:32:32-i64:64-n32" |
| +target triple = "le32-unknown-nacl" |
| + |
| +define hidden void @foo(i32 %agg.result, <16 x i8> %v) { |
|
jvoung (off chromium)
2015/05/12 23:53:05
The parameters are unused -- is it important for t
Derek Schuff
2015/05/13 00:44:50
no, removed
|
| +entry: |
| + br label %bb1 |
|
jvoung (off chromium)
2015/05/12 23:53:05
Is it required that the alloca not be in the entry
Derek Schuff
2015/05/13 00:44:50
yes it is required, comment added.
|
| + |
| +bb1: |
| + %0 = alloca i8, i32 16, align 16 |
| + %.asint = ptrtoint i8* %0 to i32 |
| + %gep109 = add i32 %.asint, 0 |
|
jvoung (off chromium)
2015/05/12 23:53:05
Would it be more resilient to optimization have ad
Derek Schuff
2015/05/13 00:44:50
actually the add isn't necessary at all.
|
| + %gep109.asptr = inttoptr i32 %gep109 to i8* |
| + %1 = load i8, i8* %gep109.asptr, align 1 |
| + %conv.i = sext i8 %1 to i32 |
| + %call5 = call i32 @bar(i32 undef, i32 %conv.i) |
| + unreachable |
| +} |
| + |
| + |
| +declare hidden i32 @bar(i32, i32) |
| + |
| + |
|
jvoung (off chromium)
2015/05/12 23:53:05
extra space
Derek Schuff
2015/05/13 00:44:50
Done.
|
| + |