Lang Hames
e8bb71f80d
Rename NonScalarIntSafe to something more appropriate.
...
llvm-svn: 143080
2011-10-26 23:50:43 +00:00
Rafael Espindola
1958dc7193
Fixes an issue reported by -verify-machineinstrs.
...
Patch by Sanjoy Das.
llvm-svn: 143064
2011-10-26 21:16:41 +00:00
Rafael Espindola
90896edc6c
This commit introduces two fake instructions MORESTACK_RET and
...
MORESTACK_RET_RESTORE_R10; which are lowered to a RET and a RET
followed by a MOV respectively. Having a fake instruction prevents
the verifier from seeing a MachineBasicBlock end with a
non-terminator (MOV). It also prevents the rather eccentric case of a
MachineBasicBlock ending with RET but having successors nevertheless.
Patch by Sanjoy Das.
llvm-svn: 143062
2011-10-26 21:12:27 +00:00
Eli Friedman
fda693e358
Add support to the old JIT for acquire/release loads and stores on x86. PR11207.
...
llvm-svn: 142841
2011-10-24 20:24:21 +00:00
Craig Topper
3cb62dca0f
Add X86 SARX, SHRX, and SHLX instructions.
...
llvm-svn: 142779
2011-10-23 22:18:24 +00:00
Craig Topper
0e63b4485c
Add X86 RORX instruction
...
llvm-svn: 142741
2011-10-23 07:34:00 +00:00
Craig Topper
7019cf1b80
Add X86 MULX instruction for disassembler.
...
llvm-svn: 142738
2011-10-23 00:33:32 +00:00
Craig Topper
c543ac0876
Remove some duplicate specifying of neverHasSideEffects and mayLoad from X86 multiply instructions.
...
llvm-svn: 142737
2011-10-22 23:13:53 +00:00
Nadav Rotem
7a79f94aad
Fix pr11193.
...
SHL inserts zeros from the right, thus even when the original
sign_extend_inreg value was of 1-bit, we need to sra.
llvm-svn: 142724
2011-10-22 12:39:25 +00:00
Craig Topper
fd96157f13
Remove intrinsics for X86 BLSI, BLSMSK, and BLSR intrinsics and replace with custom isel lowering code.
...
llvm-svn: 142642
2011-10-21 06:55:01 +00:00
Evan Cheng
057c12c2a0
Fix TLS lowering bug. The CopyFromReg must be glued to the TLSCALL. rdar://10291355
...
llvm-svn: 142550
2011-10-19 22:22:54 +00:00
Craig Topper
b1fa647871
Rename PEXTR to PEXT. Add intrinsics for BMI instructions.
...
llvm-svn: 142480
2011-10-19 07:48:35 +00:00
Eric Christopher
d9e0c89f55
Revert "Turn on the vzeroupper pass by default."
...
This reverts commit 494f7ac3e8d2ab3d94e52317abf9c42a949fe1f3.
llvm-svn: 142455
2011-10-18 23:10:11 +00:00
Eric Christopher
4046de9d18
Turn on the vzeroupper pass by default.
...
I'll remove/rename the option in a few days.
llvm-svn: 142439
2011-10-18 22:50:17 +00:00
Lang Hames
ccf186dd30
Teach fast isel about vector stores, and make DoSelectCall return false when it fails to emit a store. This fixes <rdar://problem/10215997>.
...
llvm-svn: 142432
2011-10-18 22:11:33 +00:00
Duncan Sands
2faab7dd2a
Fix a bunch of unused variable warnings when doing a release
...
build with gcc-4.6.
llvm-svn: 142350
2011-10-18 12:44:00 +00:00
David Meyer
c50cb2f15a
Remove NaClMode
...
llvm-svn: 142338
2011-10-18 05:29:23 +00:00
Craig Topper
29c4a473d0
Don't use inline assembly in 64-bit Visual Studio. Unfortunately, this means that cpuid leaf 7 can't be queried on versions of Visual Studio earlier than VS 2008 SP1. Fixes PR11147.
...
llvm-svn: 142177
2011-10-17 05:33:10 +00:00
Craig Topper
6c900d9810
Add X86 PEXTR and PDEP instructions.
...
llvm-svn: 142141
2011-10-16 16:50:08 +00:00
Benjamin Kramer
3fed5faf01
Add AsmToken::getEndLoc and use it to add ranges to x86 asm register parsing.
...
<stdin>:1:12: error: register %rax is only available in 64-bit mode
incl %rax
^~~~
llvm-svn: 142137
2011-10-16 12:10:27 +00:00
Benjamin Kramer
2119dc8df2
X86AsmParser: Synthesize EndLoc for tokens out of StartLoc + Length and print ranges for invalid operands.
...
<stdin>:1:4: error: invalid instruction mnemonic 'abc'
abc incl %edi
^~~
llvm-svn: 142135
2011-10-16 11:28:29 +00:00
Craig Topper
2cd868184c
Add X86 BZHI instruction as well as BMI2 feature detection.
...
llvm-svn: 142122
2011-10-16 07:55:05 +00:00
Craig Topper
91b4292682
Add X86 INVPCID instruction. Add 32/64-bit predicates to INVEPT, INVVPID, VMREAD, and VMWRITE to remove hack from X86RecognizableInstr.
...
llvm-svn: 142117
2011-10-16 07:05:40 +00:00
Chris Lattner
321335142c
Enhance llvm::SourceMgr to support diagnostic ranges, the same way clang does. Enhance
...
the X86 asmparser to produce ranges in the one case that was annoying me, for example:
test.s:10:15: error: invalid operand for instruction
movl 0(%rax), 0(%edx)
^~~~~~~
It should be straight-forward to enhance filecheck, tblgen, and/or the .ll parser to use
ranges where appropriate if someone is interested.
llvm-svn: 142106
2011-10-16 04:47:35 +00:00
Craig Topper
4c6357d4af
Add X86 BEXTR instruction. This instruction uses VEX.vvvv to encode Operand 3 instead of Operand 2 so needs special casing in the disassembler and code emitter. Ultimately, should pass this information from tablegen
...
llvm-svn: 142105
2011-10-16 03:51:13 +00:00
Craig Topper
dab0c92a4f
Add X86 feature detection support for BMI instructions. Added new cpuid function for accessing leafs with sub leafs specified in ECX. Also added code to keep track of the max cpuid level supported in both basic and extended leaves and qualified the existing cpuid calls and the new call to leaf 7.
...
llvm-svn: 142089
2011-10-16 00:21:51 +00:00
Craig Topper
62e63d9bb9
Add support for X86 blsr, blsmsk, and blsi instructions. Required extra work because these are the first VEX encoded instructions to use the reg field as an opcode extension.
...
llvm-svn: 142082
2011-10-15 20:46:47 +00:00
Benjamin Kramer
2b5e0cc68a
SmallVector -> array
...
llvm-svn: 142073
2011-10-15 13:28:31 +00:00
Evan Cheng
15ab434f80
A few 80-col violations.
...
llvm-svn: 141988
2011-10-14 20:36:23 +00:00
Craig Topper
0a11eb1b21
Add X86 ANDN instruction. Including instruction selection.
...
llvm-svn: 141947
2011-10-14 07:06:56 +00:00
Craig Topper
6b2120a8e1
Add X86 TZCNT instruction and patterns to select it. Also added core-avx2 processor which is gcc's name for Haswell.
...
llvm-svn: 141939
2011-10-14 03:21:46 +00:00
Jakob Stoklund Olesen
a31553dbf7
Ban rematerializable instructions with side effects.
...
TableGen infers unmodeled side effects on instructions without a
pattern. Fix some instruction definitions where that was overlooked.
Also raise an error if a rematerializable instruction has unmodeled side
effects. That doen't make any sense.
llvm-svn: 141929
2011-10-14 01:00:49 +00:00
Jakob Stoklund Olesen
d7827f928d
V_SET0 has no side effects.
...
TableGen will mark any pattern-less instruction as having unmodeled side
effects. This is extra bad for V_SET0 which gets rematerialized a lot.
This was part of the cause for PR11125, but the real bug was fixed
in r141923.
llvm-svn: 141924
2011-10-14 00:39:50 +00:00
Eli Friedman
d1174d008e
Simplify assertion, and avoid undefined shift. Based on patch by Ahmed Charles.
...
llvm-svn: 141912
2011-10-13 23:27:48 +00:00
Bill Wendling
dcd9c25744
More closely follow libgcc, which has code after the `ret' instruction to
...
release the stack segment and reset the stack pointer. Place the code in its own
MBB to make the verifier happy.
llvm-svn: 141859
2011-10-13 08:24:19 +00:00
Bill Wendling
2a571af745
Revert r141854 because it was causing failures:
...
http://lab.llvm.org:8011/builders/llvm-x86_64-linux/builds/101
--- Reverse-merging r141854 into '.':
U test/MC/Disassembler/X86/x86-32.txt
U test/MC/Disassembler/X86/simple-tests.txt
D test/CodeGen/X86/bmi.ll
U lib/Target/X86/X86InstrInfo.td
U lib/Target/X86/X86ISelLowering.cpp
U lib/Target/X86/X86.td
U lib/Target/X86/X86Subtarget.h
llvm-svn: 141857
2011-10-13 07:48:07 +00:00
Bill Wendling
a6bf25f30a
Should not add instructions to a BB after a return instruction. The machine instruction verifier doesn't like this, nor do I.
...
llvm-svn: 141856
2011-10-13 07:42:32 +00:00
Craig Topper
eb29e18c9b
Add X86 TZCNT instruction and patterns to select it. Also added core-avx2 processor which is gcc's name for Haswell.
...
llvm-svn: 141854
2011-10-13 07:09:14 +00:00
Craig Topper
0d25fa802f
Add 'implicit EFLAGS' to patterns for popcnt and lzcnt
...
llvm-svn: 141853
2011-10-13 06:18:52 +00:00
Nick Lewycky
e2234c564a
Fix indent in comment.
...
llvm-svn: 141749
2011-10-12 00:14:12 +00:00
Craig Topper
881d972428
Add HasPOPCNT predicate to the POPCNT instructions. Also mark POPCNT as modifying EFLAGS.
...
llvm-svn: 141656
2011-10-11 07:13:09 +00:00
Craig Topper
db2d702bff
Make Ivy Bridge 16-bit floating point conversion instructions require AVX.
...
llvm-svn: 141654
2011-10-11 07:01:37 +00:00
Craig Topper
c498c5c0e6
Add X86 LZCNT instruction. Including instruction selection support.
...
llvm-svn: 141651
2011-10-11 06:44:02 +00:00
Craig Topper
7ae42fbd7e
Fix disassembling of popcntw. Also remove some code that says it accounts for 64BIT_REXW_XD not existing, but it does exist.
...
llvm-svn: 141642
2011-10-11 04:34:23 +00:00
Lang Hames
41b4ff724d
Fixed natural stack alignment for Linux x86-32. Thanks Eli.
...
llvm-svn: 141616
2011-10-11 00:51:36 +00:00
Lang Hames
be4997db2f
Add a natural stack alignment field to TargetData, and prevent InstCombine from
...
promoting allocas to preferred alignments that exceed the natural
alignment. This avoids some potentially expensive dynamic stack realignments.
The natural stack alignment is set in target data strings via the "S<size>"
option. Size is in bits and must be a multiple of 8. The natural stack alignment
defaults to "unspecified" (represented by a zero value), and the "unspecified"
value does not prevent any alignment promotions. Target maintainers that care
about avoiding promotions should explicitly add the "S<size>" option to their
target data strings.
llvm-svn: 141599
2011-10-10 23:42:08 +00:00
Eli Friedman
7188ba35cb
Make sure the X86 backend doesn't explode on 128-bit shuffles in AVX mode. Fixes PR11102.
...
llvm-svn: 141585
2011-10-10 22:28:47 +00:00
Benjamin Kramer
60387b6640
X86: Add a subtarget definition for core-avx-i, which is GCC's name for ivy bridge.
...
llvm-svn: 141571
2011-10-10 19:35:07 +00:00
Nadav Rotem
38187aec17
Fix 10892 - When lowering SIGN_EXTEND_INREG do not lower v2i64 because the
...
instruction set has no 64-bit SRA support.
llvm-svn: 141570
2011-10-10 19:31:45 +00:00
Benjamin Kramer
c498279bec
X86: Add patterns for the movbe instruction (mov + bswap, only available on atom)
...
llvm-svn: 141563
2011-10-10 18:34:56 +00:00