From ca9f99dfaead1bafc110b4e4caf4b6354a4b4cf4 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 2 Aug 2007 14:27:55 +0000 Subject: Mark the SSE and MMX load instructions that X86InstrInfo::isReallyTriviallyReMaterializable knows how to handle with the isReMaterializable flag so that it is given a chance to handle them. Without hoisting constant-pool loads from loops this isn't very visible, though it does keep CodeGen/X86/constant-pool-remat-0.ll from making a copy of the constant pool on the stack. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40736 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/constant-pool-remat-0.ll | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/CodeGen/X86/constant-pool-remat-0.ll (limited to 'test') diff --git a/test/CodeGen/X86/constant-pool-remat-0.ll b/test/CodeGen/X86/constant-pool-remat-0.ll new file mode 100644 index 0000000..d5af99e --- /dev/null +++ b/test/CodeGen/X86/constant-pool-remat-0.ll @@ -0,0 +1,10 @@ +; RUN: llvm-as < %s | llc -march=x86-64 | grep LCPI | wc -l | grep 3 + +declare float @qux(float %y) + +define float @array(float %a) { + %n = mul float %a, 9.0 + %m = call float @qux(float %n) + %o = mul float %m, 9.0 + ret float %o +} -- cgit v1.1