Index: test/CodeGen/X86/fast-isel-gep.ll |
diff --git a/test/CodeGen/X86/fast-isel-gep.ll b/test/CodeGen/X86/fast-isel-gep.ll |
index 4e47c7455c53c69684f5846671a8ae4fbc3da8f6..b9a84645f68b113420a7cab104a5e33edde92f9f 100644 |
--- a/test/CodeGen/X86/fast-isel-gep.ll |
+++ b/test/CodeGen/X86/fast-isel-gep.ll |
@@ -1,6 +1,9 @@ |
; RUN: llc < %s -mtriple=x86_64-linux -O0 | FileCheck %s --check-prefix=X64 |
; RUN: llc < %s -mtriple=x86_64-win32 -O0 | FileCheck %s --check-prefix=X64 |
; RUN: llc < %s -march=x86 -O0 | FileCheck %s --check-prefix=X32 |
+; @LOCALMOD-BEGIN |
+; RUN: pnacl-llc < %s -mtriple=i686-nacl -march=x86 -O0 | FileCheck %s --check-prefix=NACL32 |
+; @LOCALMOD-END |
; GEP indices are interpreted as signed integers, so they |
; should be sign-extended to 64 bits on 64-bit targets. |
@@ -18,6 +21,13 @@ define i32 @test1(i32 %t3, i32* %t1) nounwind { |
; X64: movl (%r[[A1:si|dx]],%rax,4), %eax |
; X64: ret |
+; @LOCALMOD-BEGIN |
+; NACL32: test1: |
+; NACL32: movl (%e{{.*}},%e{{.*}},4), %eax |
+; NACL32: popl %ecx |
+; NACL32: nacljmp %ecx |
+; @LOCALMOD-END |
+ |
} |
define i32 @test2(i64 %t3, i32* %t1) nounwind { |
%t9 = getelementptr i32* %t1, i64 %t3 ; <i32*> [#uses=1] |
@@ -30,6 +40,12 @@ define i32 @test2(i64 %t3, i32* %t1) nounwind { |
; X64-LABEL: test2: |
; X64: movl (%r[[A1]],%r[[A0]],4), %eax |
; X64: ret |
+ |
+; @LOCALMOD-BEGIN |
+; NACL32: test2: |
+; NACL32: movl (%e{{.*}},%e{{.*}},4), %e |
+; @LOCALMOD-END |
+ |
} |
@@ -51,6 +67,12 @@ entry: |
; X64: movb -2(%r[[A0]]), %al |
; X64: ret |
+; @LOCALMOD-BEGIN |
+; NACL32: test3: |
+; NACL32: movl 4(%esp), %[[REG:e..]] |
+; NACL32: movb -2(%{{.*}}[[REG]]), %al |
+; @LOCALMOD-END |
+ |
} |
define double @test4(i64 %x, double* %p) nounwind { |
@@ -70,6 +92,10 @@ entry: |
; X32: 128(%e{{.*}},%e{{.*}},8) |
; X64-LABEL: test4: |
; X64: 128(%r{{.*}},%r{{.*}},8) |
+; @LOCALMOD-BEGIN |
+; NACL32: test4: |
+; NACL32: 128(%e{{.*}},%e{{.*}},8) |
+; @LOCALMOD-END |
} |
; PR8961 - Make sure the sext for the GEP addressing comes before the load that |