Eli Friedman
2bfd6b0b85
Revert unintentional commit.
...
llvm-svn: 131597
2011-05-18 23:13:10 +00:00
Eli Friedman
2fa7bea638
More instcombine simplifications towards better debug locations.
...
llvm-svn: 131596
2011-05-18 23:11:30 +00:00
Cameron Zwarich
8164175e57
Reserve the segment registers on x86 to fix verifier failures in any code that
...
uses them.
llvm-svn: 131591
2011-05-18 22:24:48 +00:00
Chad Rosier
be943c5d9a
Enables vararg functions that pass all arguments via registers to be optimized into tail-calls when possible.
...
llvm-svn: 131560
2011-05-18 19:59:50 +00:00
Mon P Wang
602defb22e
Enable autodetect of popcnt
...
llvm-svn: 131476
2011-05-17 18:33:37 +00:00
Eli Friedman
ba315a4fcc
Add x86 fast-isel for calls returning first-class aggregates. rdar://9435872.
...
This is r131438 with a couple small fixes.
llvm-svn: 131474
2011-05-17 18:29:03 +00:00
Eli Friedman
42d94ce561
Clean up the mess created by r131467+r131469.
...
llvm-svn: 131471
2011-05-17 18:02:22 +00:00
Stuart Hastings
581113d8a0
Revert 131467 due to buildbot complaint.
...
llvm-svn: 131469
2011-05-17 16:59:46 +00:00
Stuart Hastings
a2509a7ec3
Fix an obscure issue in X86_64 parameter passing: if a tiny byval is
...
passed as the fifth parameter, insure it's passed correctly (in R9).
rdar://problem/6920088
llvm-svn: 131467
2011-05-17 16:45:55 +00:00
Nadav Rotem
1b263b575b
Fix a bug in PerformEXTRACT_VECTOR_ELTCombine. The code created an ADD SDNode
...
with two different types, in cases where the index and the ptr had different
types.
llvm-svn: 131461
2011-05-17 08:31:57 +00:00
Eric Christopher
d613c05f26
Update comment.
...
llvm-svn: 131459
2011-05-17 08:16:14 +00:00
Eric Christopher
c03ef7ebb3
Support XOR and AND optimization with no return value.
...
Finishes off rdar://8470697
llvm-svn: 131458
2011-05-17 08:10:18 +00:00
Eric Christopher
f81a665961
Couple less magic numbers.
...
llvm-svn: 131457
2011-05-17 07:50:41 +00:00
Eric Christopher
dc12267689
Make this code a little less magic number laden.
...
llvm-svn: 131456
2011-05-17 07:47:55 +00:00
Chris Lattner
294ec479fb
add a note
...
llvm-svn: 131455
2011-05-17 07:22:33 +00:00
Eli Friedman
3aa2fe389f
Back out r131444 and r131438; they're breaking nightly tests. I'll look into
...
it more tomorrow.
llvm-svn: 131451
2011-05-17 02:36:59 +00:00
Eli Friedman
8c4de16d2b
Add x86 fast-isel for calls returning first-class aggregates. rdar://9435872.
...
llvm-svn: 131438
2011-05-17 00:13:47 +00:00
Eli Friedman
23e7691f59
Remove dead code. Fix associated test to use FileCheck.
...
llvm-svn: 131424
2011-05-16 21:28:22 +00:00
Eli Friedman
cb60e2293f
Make fast-isel work correctly s/uadd.with.overflow intrinsics.
...
llvm-svn: 131420
2011-05-16 21:06:17 +00:00
Eli Friedman
559f908ca7
Fix a FIXME by moving the fast-isel implementation of the objectsize intrinsic from the x86 code to the generic code.
...
llvm-svn: 131332
2011-05-14 00:47:51 +00:00
Rafael Espindola
98372d430c
Don't produce a vmovntdq if we don't have AVX support.
...
llvm-svn: 131330
2011-05-14 00:30:01 +00:00
Eli Friedman
841249aeb2
Zap useless code; this hasn't done anything useful since fast-isel switched to being bottom-up (a very long time ago).
...
llvm-svn: 131329
2011-05-14 00:19:32 +00:00
Eric Christopher
281a4a4550
Turn this into a table, this will make more sense shortly.
...
Part of rdar://8470697
llvm-svn: 131200
2011-05-11 21:44:58 +00:00
Nadav Rotem
2a654a69ed
Add custom lowering of X86 vector SRA/SRL/SHL when the shift amount is a splat vector.
...
llvm-svn: 131179
2011-05-11 08:12:09 +00:00
Eric Christopher
3c17ef53c3
Optimize atomic lock or that doesn't use the result value.
...
Next up: xor and and.
Part of rdar://8470697
llvm-svn: 131171
2011-05-10 23:57:45 +00:00
Eric Christopher
aa7c86ec19
Refactor lock versions of binary operators to be a little less
...
cut and paste.
llvm-svn: 131139
2011-05-10 18:36:16 +00:00
Benjamin Kramer
ba7c9948e8
X86: Add a bunch of peeps for add and sub of SETB.
...
"b + ((a < b) ? 1 : 0)" compiles into
cmpl %esi, %edi
adcl $0, %esi
instead of
cmpl %esi, %edi
sbbl %eax, %eax
andl $1, %eax
addl %esi, %eax
This saves a register, a false dependency on %eax
(Intel's CPUs still don't ignore it) and it's shorter.
llvm-svn: 131070
2011-05-08 18:36:07 +00:00
Eli Friedman
12e590e760
Make the logic for determining function alignment more explicit. No functionality change.
...
llvm-svn: 131012
2011-05-06 20:34:06 +00:00
Rafael Espindola
59462d8ae3
Dead code elimination.
...
llvm-svn: 130984
2011-05-06 14:56:22 +00:00
Eli Friedman
959064eae3
PR9848: pandn is not commutative.
...
No test because I can't think of any way to write one that won't break quickly.
llvm-svn: 130932
2011-05-05 17:45:31 +00:00
Jakob Stoklund Olesen
da250b29e2
Fix X86RegisterInfo::getMatchingSuperRegClass for sub_8bit_hi.
...
It is OK for B to be any GR8_ABCD_H superclass, the returned register class
doesn't have to map surjectively onto B.
llvm-svn: 130892
2011-05-04 23:54:54 +00:00
Bill Wendling
67f5e8f0a7
Replace the "movnt" intrinsics with a native store + nontemporal metadata bit.
...
<rdar://problem/8460511>
llvm-svn: 130791
2011-05-03 21:11:17 +00:00
Michael J. Spencer
575cfa0f81
Add pentium{3,4}m cpus. Patch by Alexander Best!
...
llvm-svn: 130749
2011-05-03 03:42:50 +00:00
Eric Christopher
1de0dfaab0
xmm0 is an implicit parameter in this and so shouldn't be in the
...
string template.
Fixes rdar://8493866
llvm-svn: 130747
2011-05-03 01:28:32 +00:00
Rafael Espindola
d49e7769a7
Add r130623 back now that ELF has been fixed to work with -fno-dwarf2-cfi-asm.
...
llvm-svn: 130658
2011-05-01 15:44:13 +00:00
Chandler Carruth
0d71210c33
Remove an unused variable from this function introduced in r130637,
...
likely a result of copy/paste.
llvm-svn: 130640
2011-05-01 06:14:10 +00:00
Rafael Espindola
eb5d0cb4f4
GCC uses a different encoding of pointers in the FDE when using
...
-fno-dwarf2-cfi-asm. Implement the same behavior.
llvm-svn: 130637
2011-05-01 04:49:54 +00:00
Rafael Espindola
21023ae86c
I forgot these files in the previous commit.
...
llvm-svn: 130635
2011-05-01 04:19:24 +00:00
Rafael Espindola
886aa563be
Revert the previous patch while I figure out how to make llvm-gcc
...
less agressive about disabling cfi on linux :-(
llvm-svn: 130626
2011-04-30 23:03:44 +00:00
Jakob Stoklund Olesen
534c3dfcc1
X86AsmPrinter doesn't know how to handle the X86II::MO_GOT_ABSOLUTE_ADDRESS flag
...
after folding ADD32ri to ADD32mi, so don't do that.
This only happens when the greedy register allocator gets itself in trouble and
spills %vreg9 here:
16L %vreg9<def> = MOVPC32r 0, %ESP<imp-use>; GR32:%vreg9
48L %vreg9<def> = ADD32ri %vreg9, <es:_GLOBAL_OFFSET_TABLE_>[TF=1], %EFLAGS<imp-def,dead>; GR32:%vreg9
That should never happen, the live range should be split instead.
llvm-svn: 130625
2011-04-30 23:00:05 +00:00
Rafael Espindola
9455887b10
Enable CFI on OS X.
...
Currently the output should be almost identical to the one produced by CodeGen
to make the transition easier.
The only two differences I know of are:
* Some files get an extra advance loc of size 0. This will be fixed when
relaxations are enabled.
* The optimization of declaring an EH symbol as an external variable is not
implemented. This is a subset of adding the nounwind attribute, so we if really
this at -O0 we should probably do it at the IL level.
llvm-svn: 130623
2011-04-30 22:29:54 +00:00
Benjamin Kramer
81d46d0c06
This is done.
...
llvm-svn: 130499
2011-04-29 14:09:57 +00:00
Chris Lattner
52e40d9b4c
clean up after Sean's r127646 patch.
...
llvm-svn: 130475
2011-04-29 05:40:18 +00:00
Daniel Dunbar
a65f557314
Target/X86/MC: Add an option for disabling arith relaxation, for my own testing
...
purposes.
llvm-svn: 130438
2011-04-28 21:23:31 +00:00
Eli Friedman
afc21e9be2
fast-isel sret calls, try 2. We actually do need to do something on x86-32. rdar://problem/9303592 .
...
llvm-svn: 130429
2011-04-28 20:19:12 +00:00
Eli Friedman
7b68473355
Revert r130348; causing buildbot issues on x86-32.
...
llvm-svn: 130412
2011-04-28 18:06:10 +00:00
Rafael Espindola
f75a67d261
Add a getExprForPersonalitySymbol method to MCAsmInfo. Use it when
...
converting the symbol passed to .cfi_personality into bytes is the file.
llvm-svn: 130400
2011-04-28 16:09:09 +00:00
Chris Lattner
61521f8481
move PR9803 to this readme.
...
llvm-svn: 130385
2011-04-28 05:33:16 +00:00
Eli Friedman
bcb7cd335d
fast-isel sret. We actually don't need to do anything special on x86. :) rdar://problem/9303592 .
...
llvm-svn: 130348
2011-04-27 23:58:52 +00:00
Rafael Espindola
36e419b524
Remove unnecessary argument.
...
llvm-svn: 130343
2011-04-27 23:17:57 +00:00