Massive rewrite of MMX:
authorDale Johannesen <dalej@apple.com>
Thu, 30 Sep 2010 23:57:10 +0000 (23:57 +0000)
committerDale Johannesen <dalej@apple.com>
Thu, 30 Sep 2010 23:57:10 +0000 (23:57 +0000)
commit0488fb649a56b7fc89a5814df5308813f9e5a85d
tree21913bb81960866b73c6b49f29782c142563304c
parenta7e3b564773cc45a1b08383c09fe86b17b3ffe92
Massive rewrite of MMX:
The x86_mmx type is used for MMX intrinsics, parameters and
return values where these use MMX registers, and is also
supported in load, store, and bitcast.

Only the above operations generate MMX instructions, and optimizations
do not operate on or produce MMX intrinsics.

MMX-sized vectors <2 x i32> etc. are lowered to XMM or split into
smaller pieces.  Optimizations may occur on these forms and the
result casted back to x86_mmx, provided the result feeds into a
previous existing x86_mmx operation.

The point of all this is prevent optimizations from introducing
MMX operations, which is unsafe due to the EMMS problem.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115243 91177308-0d34-0410-b5e6-96231b3b80d8
40 files changed:
include/llvm/IntrinsicsX86.td
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/Target/X86/X86CallingConv.td
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86ISelLowering.h
lib/Target/X86/X86InstrFragmentsSIMD.td
lib/Target/X86/X86InstrMMX.td
lib/Target/X86/X86MCInstLower.cpp
lib/Target/X86/X86RegisterInfo.td
lib/Transforms/IPO/DeadArgumentElimination.cpp
lib/Transforms/Scalar/ScalarReplAggregates.cpp
lib/VMCore/AutoUpgrade.cpp
lib/VMCore/Instructions.cpp
lib/VMCore/Type.cpp
test/Assembler/AutoUpgradeIntrinsics.ll
test/Bitcode/ssse3_palignr.ll.bc
test/CodeGen/X86/2007-04-25-MMX-PADDQ.ll
test/CodeGen/X86/2007-05-15-maskmovq.ll
test/CodeGen/X86/2007-06-15-IntToMMX.ll
test/CodeGen/X86/2007-07-03-GR64ToVR64.ll
test/CodeGen/X86/2008-04-08-CoalescerCrash.ll
test/CodeGen/X86/2008-08-23-64Bit-maskmovq.ll
test/CodeGen/X86/2008-09-05-sinttofp-2xi32.ll
test/CodeGen/X86/2009-08-02-mmx-scalar-to-vector.ll
test/CodeGen/X86/2010-04-23-mmx-movdq2q.ll
test/CodeGen/X86/fast-isel-bc.ll
test/CodeGen/X86/mmx-arg-passing.ll
test/CodeGen/X86/mmx-arg-passing2.ll
test/CodeGen/X86/mmx-arith.ll
test/CodeGen/X86/mmx-bitcast-to-i64.ll
test/CodeGen/X86/mmx-insert-element.ll
test/CodeGen/X86/mmx-punpckhdq.ll
test/CodeGen/X86/mmx-shift.ll
test/CodeGen/X86/mmx-shuffle.ll
test/CodeGen/X86/mmx-vzmovl-2.ll
test/CodeGen/X86/mmx-vzmovl.ll
test/CodeGen/X86/vec_insert-5.ll
test/CodeGen/X86/vec_insert-7.ll
test/CodeGen/X86/vec_zero_cse.ll
utils/TableGen/X86RecognizableInstr.cpp