summaryrefslogtreecommitdiff
path: root/test/CodeGen
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-07-25 00:02:30 +0000
committerDan Gohman <gohman@apple.com>2008-07-25 00:02:30 +0000
commit6d69ba8a6901c69d78488cbc41f8dbf080618fde (patch)
treed3561769602cb34fb08db592e6576877e3be6165 /test/CodeGen
parent3eee6542f5c65dce299361fa5435340513cf3fe4 (diff)
downloadllvm-6d69ba8a6901c69d78488cbc41f8dbf080618fde.tar.gz
llvm-6d69ba8a6901c69d78488cbc41f8dbf080618fde.tar.bz2
llvm-6d69ba8a6901c69d78488cbc41f8dbf080618fde.tar.xz
Enable rematerialization of constants using AliasAnalysis::pointsToConstantMemory,
and knowledge of PseudoSourceValues. This unfortunately isn't sufficient to allow constants to be rematerialized in PIC mode -- the extra indirection is a complication. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54000 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/X86/remat-constant.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/X86/remat-constant.ll b/test/CodeGen/X86/remat-constant.ll
new file mode 100644
index 0000000000..eb12c312e9
--- /dev/null
+++ b/test/CodeGen/X86/remat-constant.ll
@@ -0,0 +1,15 @@
+; RUN: llvm-as < %s | llc -march=x86-64 -relocation-model=static | grep xmm | count 2
+
+declare void @bar() nounwind
+
+@a = external constant float
+
+declare void @qux(float %f) nounwind
+
+define void @foo() nounwind {
+ %f = load float* @a
+ call void @bar()
+ call void @qux(float %f)
+ call void @qux(float %f)
+ ret void
+}