summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
authorSean Fertile <sfertile@ca.ibm.com>2019-09-24 18:04:51 +0000
committerSean Fertile <sfertile@ca.ibm.com>2019-09-24 18:04:51 +0000
commitb3a9320c08ef45de8039075cc532bdb89b5d88f9 (patch)
tree28af73242d4dcfde7888be3fde2b014b46489dd4 /llvm/test/CodeGen
parentd9629b88ff72927cac6494293e5a5501e504b222 (diff)
downloadbcm5719-llvm-b3a9320c08ef45de8039075cc532bdb89b5d88f9.tar.gz
bcm5719-llvm-b3a9320c08ef45de8039075cc532bdb89b5d88f9.zip
Extends the expansion of the LWZtoc pseduo op for AIX.
Differential Revision: https://reviews.llvm.org/D67853 llvm-svn: 372772
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/PowerPC/lower-globaladdr32-aix-asm.ll21
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/PowerPC/lower-globaladdr32-aix-asm.ll b/llvm/test/CodeGen/PowerPC/lower-globaladdr32-aix-asm.ll
new file mode 100644
index 00000000000..b368cb43dbb
--- /dev/null
+++ b/llvm/test/CodeGen/PowerPC/lower-globaladdr32-aix-asm.ll
@@ -0,0 +1,21 @@
+; RUN: llc -mtriple powerpc-ibm-aix-xcoff \
+; RUN: -code-model=small < %s | FileCheck %s
+
+@b = common global i32 0
+@a = common global i32 0
+
+define void @test() {
+ %1 = load i32, i32* @b
+ store i32 %1, i32* @a
+ ret void
+}
+
+; CHECK-LABEL: test
+; CHECK-DAG: lwz [[REG1:[0-9]+]], LC0(2)
+; CHECK-DAG: lwz [[REG2:[0-9]+]], LC1(2)
+; CHECK-DAG: lwz [[REG3:[0-9]+]], 0([[REG1]])
+; CHECK: stw [[REG3]], 0([[REG2]])
+; CHECK: blr
+
+; TODO Update test when TOC-entry emission lands.
+; CHECK-NOT: .tc
OpenPOWER on IntegriCloud