Chad Rosier
74a3944974
Fix 80-column violations.
...
llvm-svn: 147495
2012-01-03 23:19:12 +00:00
Jakob Stoklund Olesen
993997b659
Revert r146997, "Heed spill slot alignment on ARM."
...
This patch caused a miscompilation of oggenc because a frame pointer was
suddenly needed halfway through register allocation.
<rdar://problem/10625436>
llvm-svn: 147487
2012-01-03 22:34:35 +00:00
Jakob Stoklund Olesen
2c2f5b0b2b
Assert when reserved registers have been assigned.
...
This can only happen if the set of reserved registers changes during
register allocation.
<rdar://problem/10625436>
llvm-svn: 147486
2012-01-03 22:34:31 +00:00
Nadav Rotem
79f1692fe0
Revert 147426 because it caused pr11696.
...
llvm-svn: 147485
2012-01-03 22:19:42 +00:00
Nadav Rotem
cc49c4d74d
Fix incorrect widening of the bitcast sdnode in case the incoming operand is integer-promoted.
...
llvm-svn: 147484
2012-01-03 22:12:28 +00:00
Chad Rosier
afcaa8f38a
Enhance DAGCombine for transforming 128->256 casts into a vmovaps, rather
...
then a vxorps + vinsertf128 pair if the original vector came from a load.
rdar://10594409
llvm-svn: 147481
2012-01-03 21:05:52 +00:00
Nick Lewycky
ba84a9652a
Conform to the style guide; remove 'else' after 'return'. Also remove an extra
...
if-statement by turning it into an assert. No functionality change.
llvm-svn: 147474
2012-01-03 20:33:00 +00:00
Owen Anderson
8326b459f7
Remove the restriction that target intrinsics can only involve legal types. Targets can perfects well support intrinsics on illegal types, as long as they are prepared to perform custom expansion during type legalization. For example, a target where i64 is illegal might still support the i64 intrinsic operation using pairs of i32's. ARM already does some expansions like this for non-intrinsic operations.
...
llvm-svn: 147472
2012-01-03 20:09:02 +00:00
Lang Hames
57893457a4
Clarified assert text.
...
llvm-svn: 147471
2012-01-03 20:05:57 +00:00
Matt Beaumont-Gay
4896c33378
Fix malformed assert.
...
If anybody has strong feelings about 'default: assert(0 && "blah")' vs
'default: llvm_unreachable("blah")', feel free to regularize the instances of
each in this file.
llvm-svn: 147459
2012-01-03 19:03:59 +00:00
Nick Lewycky
d791228af6
Fix typo in ruler. No functionality change.
...
llvm-svn: 147454
2012-01-03 18:22:43 +00:00
Devang Patel
131611237d
Intel style asm variant does not need '%' prefix.
...
llvm-svn: 147453
2012-01-03 18:22:10 +00:00
Stepan Dyatkovskiy
7d6561f886
Type: replaced usage of ID with getTypeID().
...
llvm-svn: 147446
2012-01-03 14:05:04 +00:00
Elena Demikhovsky
40f2c3077f
Fixed a bug in SelectionDAG.cpp.
...
The failure seen on win32, when i64 type is illegal.
It happens on stage of conversion VECTOR_SHUFFLE to BUILD_VECTOR.
The failure message is:
llc: SelectionDAG.cpp:784: void VerifyNodeCommon(llvm::SDNode*): Assertion `(I->getValueType() == EltVT || (EltVT.isInteger() && I->getValueType().isInteger() && EltVT.bitsLE(I->getValueType()))) && "Wrong operand type!"' failed.
I added a special test that checks vector shuffle on win32.
llvm-svn: 147445
2012-01-03 11:59:04 +00:00
Andrew Trick
6839d66ab3
Fix SCEVExpander to handle loops with no preheader when LSR gives it a
...
"phony" insertion point.
Fixes rdar://10619599: "SelectionDAGBuilder shouldn't visit PHI nodes!" assert
llvm-svn: 147439
2012-01-02 21:25:10 +00:00
Craig Topper
dbc281bcbe
Miscellaneous shuffle lowering cleanup. No functional changes. Primarily converting the indexing loops to unsigned to be consistent across functions.
...
llvm-svn: 147430
2012-01-02 09:17:37 +00:00
Craig Topper
69e0a09d8f
Make CanXFormVExtractWithShuffleIntoLoad reject loads with multiple uses. Also make it return false if there's not even a load at all. This makes the code better match the code in DAGCombiner that it tries to match. These two changes prevent some cases where vector_shuffles were making it to instruction selection and causing the older shuffle selection code to be triggered. Also needed to fix a bad pattern that this change exposed. This is the first step towards getting rid of the old shuffle selection support. No test cases yet because there's no way to tell whether a shuffle was handled in the legalize stage or at instruction selection.
...
llvm-svn: 147428
2012-01-02 08:46:48 +00:00
Nadav Rotem
6929a8868b
Optimize the sequence blend(sign_extend(x)) to blend(shl(x)) since SSE blend instructions only look at the highest bit.
...
llvm-svn: 147426
2012-01-02 08:05:46 +00:00
Rafael Espindola
7ab0861d5f
Materialize functions whose basic blocks are used by global variables. Fixes
...
PR11677.
llvm-svn: 147425
2012-01-02 07:49:53 +00:00
Craig Topper
f7c9bf17dd
Allow CRC32 instructions to be selected when AVX is enabled.
...
llvm-svn: 147411
2012-01-01 19:51:58 +00:00
Craig Topper
d8ae2d9f27
Fix sfence, lfence, mfence, and clflush to be able to be selected when AVX is enabled. Fix monitor and mwait to require SSE3 or AVX, previously they worked even if SSE3 was disabled. Make prefetch instructions not set the execution domain since they don't use XMM registers.
...
llvm-svn: 147409
2012-01-01 19:40:22 +00:00
Benjamin Kramer
210900f7c2
X86Disassembler: Fix undefined behavior found by GCC 4.6
...
llvm-svn: 147404
2012-01-01 17:55:36 +00:00
Benjamin Kramer
fba4e88bc2
PatternMatch: Introduce a matcher for instructions with the "exact" bit. Use it to simplify a few matchers.
...
llvm-svn: 147403
2012-01-01 17:55:30 +00:00
Rafael Espindola
1cb17796db
Revert 147399. It broke CodeGen/ARM/vext.ll.
...
llvm-svn: 147400
2012-01-01 17:36:23 +00:00
Elena Demikhovsky
9b74049783
Fixed a bug in SelectionDAG.cpp.
...
The failure seen on win32, when i64 type is illegal.
It happens on stage of conversion VECTOR_SHUFFLE to BUILD_VECTOR.
The failure message is:
llc: SelectionDAG.cpp:784: void VerifyNodeCommon(llvm::SDNode*): Assertion `(I->getValueType() == EltVT || (EltVT.isInteger() && I->getValueType().isInteger() && EltVT.bitsLE(I->getValueType()))) && "Wrong operand type!"' failed.
I added a special test that checks vector shuffle on win32.
llvm-svn: 147399
2012-01-01 16:22:47 +00:00
Craig Topper
ef59fe1ad4
Merge X86 SHUFPS and SHUFPD node types.
...
llvm-svn: 147394
2011-12-31 23:50:21 +00:00
Craig Topper
0311c45aed
Add patterns for integer forms of SHUFPD/VSHUFPD with a memory load.
...
llvm-svn: 147393
2011-12-31 23:24:49 +00:00
Craig Topper
c01ce759d7
Fix typo in a SHUFPD and VSHUFPD pattern that prevented SHUFPD/VSHUFPD with a load from being selected.
...
llvm-svn: 147392
2011-12-31 23:15:11 +00:00
Nick Lewycky
c7e12f7dbf
Make use of the exact bit when optimizing '(X >>exact 3) << 1' to eliminate the
...
'and' that would zero out the trailing bits, and to produce an exact shift
ourselves.
llvm-svn: 147391
2011-12-31 21:30:22 +00:00
Dylan Noblesmith
06b6c587e8
VMCore: add assert for miscompile
...
See PR11652. Trying to add this assert to
setSubclassData() itself actually prevented
the miscompile entirely, so it has to be here.
This makes the source of the bug more obvious
than the other asserts triggering later on did.
llvm-svn: 147390
2011-12-31 13:58:58 +00:00
Bruno Cardoso Lopes
4ed60a4736
Cleanup Mips code and rename some variables. Patch by Jack Carter
...
llvm-svn: 147383
2011-12-30 21:09:41 +00:00
Bruno Cardoso Lopes
7de2b7652d
Improve Mips JIT.
...
Implement encoder methods getJumpTargetOpValue and getBranchTargetOpValue
for jmptarget and brtarget Mips tablegen operand types in the code emitter
for old-style JIT. Rename the pc relative relocation for branches - new
name is Mips::reloc_mips_pc16.
Patch by Sasa Stankovic
llvm-svn: 147382
2011-12-30 21:04:30 +00:00
Craig Topper
4065311852
Make FMA4 imply AVX so that YMM registers would be available. Necessitates removing from Bulldozer CPU types since it would enable AVX code generation implicitly. Also make SSE4A imply SSE3. Without some level of SSE implied, XMM registers wouldn't be legal.
...
llvm-svn: 147369
2011-12-30 07:16:00 +00:00
Craig Topper
b4db8689ee
Add disassembler support for VPERMIL2PD and VPERMIL2PS.
...
llvm-svn: 147368
2011-12-30 06:23:39 +00:00
Craig Topper
089be4fefa
Add FMA4 instructions to disassembler.
...
llvm-svn: 147367
2011-12-30 05:20:36 +00:00
Craig Topper
44a5136fac
Separate the concept of having memory access in operand 4 from the concept of having the W bit set for XOP instructons. Removes ORing W-bits in the encoder and will similarly simplify the disassembler implementation.
...
llvm-svn: 147366
2011-12-30 04:48:54 +00:00
Craig Topper
97ba7b38eb
Combine FMA4 SS/SD patterns with the instruction definitions.
...
llvm-svn: 147365
2011-12-30 03:33:59 +00:00
Craig Topper
bdcc86a43c
Combine FMA4 PS/PD patterns with the instruction definitions.
...
llvm-svn: 147364
2011-12-30 03:17:15 +00:00
Craig Topper
33091db89a
Change FMA4 memory forms to use memopv* instead of alignedloadv*. No need to force alignment on these instructions. Add a couple testcases for memory forms.
...
llvm-svn: 147361
2011-12-30 02:18:36 +00:00
Craig Topper
e066262284
Fix load size for FMA4 SS/SD instructions. They need to use f32 and f64 size, but with the special handling to be compatible with the intrinsic expecting a vector. Similar handling is already used elsewhere.
...
llvm-svn: 147360
2011-12-30 01:49:53 +00:00
Hal Finkel
4a09216dfb
Cleanup stack/frame register define/kill states. This fixes two bugs:
...
1. The ST*UX instructions that store and update the stack pointer did not set define/kill on R1. This became a problem when I activated post-RA scheduling (and had incorrectly adjusted the Frames-large test).
2. eliminateFrameIndex did not kill its scavenged temporary register, and this could cause the scavenger to exhaust all available registers (and its emergency spill slot) when there were a lot of CR values to spill. The 2010-02-12-saveCR test has been adjusted to check for this.
llvm-svn: 147359
2011-12-30 00:34:00 +00:00
Rafael Espindola
db7319d272
Implement cfi_restore. Patch by Brian Anderson!
...
llvm-svn: 147356
2011-12-29 21:43:03 +00:00
Rafael Espindola
bc8c3d0ca0
Rename Remember and Restore to RememberState and RestoreState for consistency.
...
llvm-svn: 147354
2011-12-29 21:09:08 +00:00
Craig Topper
97e84c23a1
Fix execution domains for PS/PD FMA3 instructions. Add SS/SD forms o FMA3 instructions.
...
llvm-svn: 147353
2011-12-29 20:43:40 +00:00
Rafael Espindola
27298c6f33
Implement .cfi_escape. Patch by Brian Anderson!
...
llvm-svn: 147352
2011-12-29 20:24:47 +00:00
Craig Topper
bcfd070378
Expose FMA3 instructions to the disassembler.
...
llvm-svn: 147351
2011-12-29 20:03:14 +00:00
Craig Topper
9d664349d6
Make FMA3 imply AVX needs to be enabled. Particularly because 256-bit types aren't valid unless AVX is enabled.
...
llvm-svn: 147349
2011-12-29 19:46:19 +00:00
Craig Topper
21029d1f81
Change XOP detection to use the correct CPUID bit instead of using the FMA4 bit.
...
llvm-svn: 147348
2011-12-29 19:25:56 +00:00
Craig Topper
93d614dd3a
Add FeaturePOPCNT to all CPU types that lost it was removed from SSE42/SSE4A in r147339.
...
llvm-svn: 147347
2011-12-29 18:47:31 +00:00
Craig Topper
ba73cefabb
Mark non-VEX forms of PCLMUL instructions as requiring SSE2 to be enabled along with CLMUL. That's required for the XMM registers to be valid for integer data. Doesn't change any behavior since the CLMUL instructions don't have patterns yet.
...
llvm-svn: 147345
2011-12-29 18:08:36 +00:00