summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/PowerPC
diff options
context:
space:
mode:
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>2016-03-12 10:23:07 +0000
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>2016-03-12 10:23:07 +0000
commitbd56e4e25a6342292eb3c6ba7b391ac5826a19d8 (patch)
tree1933b48bfde1ca2892509baec5a90e6684842a00 /llvm/test/CodeGen/PowerPC
parent777f96304e249b738f4f91edf1c4dd302ad862c8 (diff)
downloadbcm5719-llvm-bd56e4e25a6342292eb3c6ba7b391ac5826a19d8.tar.gz
bcm5719-llvm-bd56e4e25a6342292eb3c6ba7b391ac5826a19d8.zip
Fix for PR 26378
This patch corresponds to review: http://reviews.llvm.org/D17712 We were not clearing the TOC vector in PPCAsmPrinter when initializing it. This caused duplicate definition asserts when the pass is reused on the module (i.e. with -compile-twice or in JIT contexts). llvm-svn: 263338
Diffstat (limited to 'llvm/test/CodeGen/PowerPC')
-rw-r--r--llvm/test/CodeGen/PowerPC/pr26378.ll6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/PowerPC/pr26378.ll b/llvm/test/CodeGen/PowerPC/pr26378.ll
new file mode 100644
index 00000000000..e5e20553f52
--- /dev/null
+++ b/llvm/test/CodeGen/PowerPC/pr26378.ll
@@ -0,0 +1,6 @@
+; RUN: llc -compile-twice -filetype obj \
+; RUN: -mtriple=powerpc64le-unknown-unknown -mcpu=pwr8 < %s
+@foo = common global i32 0, align 4
+define i8* @blah() #0 {
+ ret i8* bitcast (i32* @foo to i8*)
+}
OpenPOWER on IntegriCloud