aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-06-06 04:17:04 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-06-06 04:17:04 +0000
commit1762c1439e5e9e55880e6e938a74e14e3783de66 (patch)
tree39bdacc3c965136caa2d4dc203ab35a27d8f1969
parent23ef1055808c2bcf5aa29d63b87f5d3aa5da5992 (diff)
downloadexternal_llvm-1762c1439e5e9e55880e6e938a74e14e3783de66.zip
external_llvm-1762c1439e5e9e55880e6e938a74e14e3783de66.tar.gz
external_llvm-1762c1439e5e9e55880e6e938a74e14e3783de66.tar.bz2
Get rid of a bogus pattern that interferes with optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72985 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/X86InstrMMX.td7
-rw-r--r--test/CodeGen/X86/2009-06-05-ScalarToVectorByteMMX.ll7
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/Target/X86/X86InstrMMX.td b/lib/Target/X86/X86InstrMMX.td
index 8f287e1..38c5471 100644
--- a/lib/Target/X86/X86InstrMMX.td
+++ b/lib/Target/X86/X86InstrMMX.td
@@ -605,13 +605,6 @@ let AddedComplexity = 15 in {
(MMX_PUNPCKLDQrr VR64:$src, (MMX_V_SET0))>;
}
-// Scalar to v4i16 / v8i8. The source may be a GR32, but only the lower
-// 8 or 16-bits matter.
-def : Pat<(bc_v8i8 (v2i32 (scalar_to_vector GR32:$src))),
- (MMX_MOVD64rr GR32:$src)>;
-def : Pat<(bc_v4i16 (v2i32 (scalar_to_vector GR32:$src))),
- (MMX_MOVD64rr GR32:$src)>;
-
// Patterns to perform canonical versions of vector shuffling.
let AddedComplexity = 10 in {
def : Pat<(v8i8 (mmx_unpckl_undef VR64:$src, (undef))),
diff --git a/test/CodeGen/X86/2009-06-05-ScalarToVectorByteMMX.ll b/test/CodeGen/X86/2009-06-05-ScalarToVectorByteMMX.ll
new file mode 100644
index 0000000..94df530
--- /dev/null
+++ b/test/CodeGen/X86/2009-06-05-ScalarToVectorByteMMX.ll
@@ -0,0 +1,7 @@
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+mmx | not grep movl
+
+define <8 x i8> @a(i8 zeroext %x) nounwind {
+ %r = insertelement <8 x i8> undef, i8 %x, i32 0
+ ret <8 x i8> %r
+}
+