Eli Friedman [Tue, 31 Jan 2012 01:08:03 +0000 (01:08 +0000)]
Use the correct ShiftAmtTy for creating shifts after legalization. PR11881. Not committing a testcase because I think it will be too fragile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149315
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 31 Jan 2012 01:05:20 +0000 (01:05 +0000)]
Get rid of references to dead intrinsics.
The eh.selector and eh.resume intrinsics aren't used anymore. Get rid of some
calls to them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149314
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 31 Jan 2012 01:01:16 +0000 (01:01 +0000)]
Formatting cleanups. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149312
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 31 Jan 2012 00:57:08 +0000 (00:57 +0000)]
Relax constructor for IntrusiveRefCntPtr to not be explicit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149309
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 31 Jan 2012 00:57:04 +0000 (00:57 +0000)]
Use traits for IntrusiveRefCntPtr to determine how to increment/decrement a reference count.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149308
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 31 Jan 2012 00:56:53 +0000 (00:56 +0000)]
Remove no-longer-useful dyn_casts and pals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149307
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 31 Jan 2012 00:26:24 +0000 (00:26 +0000)]
Add a constified getLandingPad() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149303
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Mon, 30 Jan 2012 23:50:10 +0000 (23:50 +0000)]
[asan] fix the ObjC support (asan Issue #33)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149300
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 30 Jan 2012 23:47:44 +0000 (23:47 +0000)]
Chris's constant data sequence refactoring actually enabled printing
vectors of all one bits to be printed more cleverly in the AsmPrinter.
Unfortunately, the byte value for all one bits is the same with
-fsigned-char as the error return of '-1'. Force this to be the unsigned
byte value when returning it to avoid this problem, and update the test
case for the shiny new behavior.
Yay for building LLVM and Clang with -funsigned-char.
Chris, please review, and let me know if there is any reason to not
desire this change. It seems good on the surface, and certainly intended
based on the code written.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149299
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 30 Jan 2012 23:10:32 +0000 (23:10 +0000)]
PR11834: Use macros which are defined on Windows. Patch by Marina Yatsina.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149294
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 30 Jan 2012 23:05:41 +0000 (23:05 +0000)]
basic-aa does support AliasAnalysis chaining now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149293
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 30 Jan 2012 22:47:12 +0000 (22:47 +0000)]
Intel syntax. Adjust special code, used to recognize cmp<comparison code>{ss,sd,ps,pd}, for intel syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149291
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 30 Jan 2012 22:44:13 +0000 (22:44 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149289
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 30 Jan 2012 21:13:22 +0000 (21:13 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149275
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Mon, 30 Jan 2012 20:47:04 +0000 (20:47 +0000)]
Implement String Cast from Integer
Allow casts from integer to string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149273
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 30 Jan 2012 20:02:42 +0000 (20:02 +0000)]
Intel syntax. Support .intel_syntax directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149270
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 30 Jan 2012 20:01:35 +0000 (20:01 +0000)]
Fix refacto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149269
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Mon, 30 Jan 2012 19:26:20 +0000 (19:26 +0000)]
Here's a new one: GCC was complaining about an only-used-in-asserts
*function*. Wrap the function in #ifndef NDEBUG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149259
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 30 Jan 2012 18:19:30 +0000 (18:19 +0000)]
Various improvements suggested by Duncan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149255
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 30 Jan 2012 16:57:18 +0000 (16:57 +0000)]
Eliminate narrowing conversion in initializer list, to make C++11 happy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149254
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 30 Jan 2012 15:16:21 +0000 (15:16 +0000)]
X86: Simplify shuffle mask generation code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149248
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Potapenko [Mon, 30 Jan 2012 10:40:22 +0000 (10:40 +0000)]
Fix compilation of ASan tests on OS X Lion (see code.google.com/p/address-sanitizer/issues/detail?id=32)
The redzones emitted by AddressSanitizer for CFString instances confuse the linker and are of little use, so we shouldn't add them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149243
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 30 Jan 2012 08:33:36 +0000 (08:33 +0000)]
Add GCCBuiltin declarations for cmpsd/cmpss/cmppd/cmpps to allow custom code to be removed from clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149234
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 30 Jan 2012 07:50:31 +0000 (07:50 +0000)]
Fix pattern for memory form of PSHUFD for use with FP vectors to remove bitcast to an integer vector that normal code wouldn't have. Also remove bitcasts from code that turns splat vector loads into a shuffle as it was making the broken pattern necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149232
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 30 Jan 2012 07:36:01 +0000 (07:36 +0000)]
fix a major oversight that is breaking some llvm-test tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149230
91177308-0d34-0410-b5e6-
96231b3b80d8
Talin [Mon, 30 Jan 2012 06:55:43 +0000 (06:55 +0000)]
DenseMap::find_as() and unit tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149229
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 30 Jan 2012 06:21:21 +0000 (06:21 +0000)]
First step of flipping on ConstantDataSequential: enable ConstantDataVector
to be formed whenever ConstantVector::get is used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149226
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 30 Jan 2012 05:55:11 +0000 (05:55 +0000)]
when verbose asm is on, print integers in ConstantDataSequentials just
like normal integers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149223
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 30 Jan 2012 05:49:43 +0000 (05:49 +0000)]
don't lose tail padding on ConstantDataAggregate vec3's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149222
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 30 Jan 2012 05:34:13 +0000 (05:34 +0000)]
Fix ConstantFoldShuffleVectorInstruction to properly handle the case
when the result type has a different # elements than the input vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149221
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 30 Jan 2012 03:15:47 +0000 (03:15 +0000)]
CMake: Promote the testing targets out of folders on IDE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149220
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 30 Jan 2012 03:01:03 +0000 (03:01 +0000)]
CMake: Add the folder "Tablegenning" on llvm-tblgen targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149219
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 30 Jan 2012 01:17:43 +0000 (01:17 +0000)]
initialize the Next field to null
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149217
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 30 Jan 2012 01:10:15 +0000 (01:10 +0000)]
Move some XOP patterns into instruction definition. Replae VPCMOV intrinsic patterns with custom lowering to a target specific nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149216
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 30 Jan 2012 00:51:16 +0000 (00:51 +0000)]
Add bitcode reader and writer support for ConstantDataAggregate, which
should be feature complete now. Lets see if it works.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149215
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 29 Jan 2012 23:09:12 +0000 (23:09 +0000)]
Cleanup the organization of some methods in llvm::Triple and provide
a better doxyment group for convenience predicates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149211
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 29 Jan 2012 20:15:10 +0000 (20:15 +0000)]
Move Clang's file-level locking facility over to LLVM's support
library, since it doesn't really have anything to do with Clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149203
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sun, 29 Jan 2012 09:11:50 +0000 (09:11 +0000)]
Cleanups for EABI standard functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149195
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sun, 29 Jan 2012 09:06:09 +0000 (09:06 +0000)]
Use base AAPCS for varargs functions even for AAPCS-VFP CC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149194
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sun, 29 Jan 2012 01:29:28 +0000 (01:29 +0000)]
Fix some scavenger performance issues.
- Don't call malloc+free in the very hot forward().
- Don't call isTiedToDefOperand().
- Don't create BitVector temporaries.
- Merge DeadRegs into KillRegs.
- Eliminate the early clobber checks, they were irrelevant to scavenging.
- Remove unnecessary code from -Asserts builds.
This speeds up ARM PEI by 3.4x and overall llc -O0 codegen time by 11%.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149189
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sun, 29 Jan 2012 01:29:25 +0000 (01:29 +0000)]
Avoid creating BitVector temporaries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149188
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sun, 29 Jan 2012 01:29:22 +0000 (01:29 +0000)]
Add a BitVector::reset(BitVector&) method.
The alternative LHS &= ~RHS is way too slow because it creates a
temporary that calls malloc/free.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149187
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 28 Jan 2012 23:33:44 +0000 (23:33 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149185
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Sat, 28 Jan 2012 18:30:07 +0000 (18:30 +0000)]
Add a note about a potential optimization for clz/ctz patterns for ARM
(and other targets).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149182
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Sat, 28 Jan 2012 15:58:32 +0000 (15:58 +0000)]
Ensure .AliasedSymbol() is called on all uses of getSymbol(). Affects ARM and MIPS ELF backends.
Fixes PR11877
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149180
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 28 Jan 2012 15:28:41 +0000 (15:28 +0000)]
Silence GCC's -Wreturn-type warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149179
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 28 Jan 2012 06:22:14 +0000 (06:22 +0000)]
Small improvement to the recursion detection logic from the previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149175
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 28 Jan 2012 05:57:00 +0000 (05:57 +0000)]
Handle recursive variable definitions directly. This gives us better error
messages and allows us to fix PR11865.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149174
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Sat, 28 Jan 2012 04:27:16 +0000 (04:27 +0000)]
[asan] correctly use ConstantExpr::getGetElementPtr. Catch by NAKAMURA Takumi
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149172
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 28 Jan 2012 01:17:56 +0000 (01:17 +0000)]
Reapply r149159 with a fix to add to a PHI node with a non-null parent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149164
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sat, 28 Jan 2012 01:17:01 +0000 (01:17 +0000)]
Remove code that adds live ranges for dead defs. It seems to be breaking things.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149163
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 28 Jan 2012 01:10:01 +0000 (01:10 +0000)]
Revert r149159 until I can fix tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149162
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 28 Jan 2012 00:47:18 +0000 (00:47 +0000)]
Don't always create a separate block for the call to _Unwind_Resume.
Sometimes there is only one 'resume' instruction per function. In those
situations, we don't need a separate block for the call to _Unwind_Resume. In
fact, it adds a lot of overhead to code-gen if we do that -- especially at -O0.
If we have a single 'resume' instruction, just generate the call within that
block.
<rdar://problem/
10694814>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149159
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Sat, 28 Jan 2012 00:03:24 +0000 (00:03 +0000)]
Fix Record Name Reference
Get the record name though the init to avoid an assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149153
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 27 Jan 2012 23:52:25 +0000 (23:52 +0000)]
Silence warning about parens for && within ||
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149152
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 27 Jan 2012 23:33:07 +0000 (23:33 +0000)]
Add r149110 back with a fix for when the vector and the int have the same
width.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149151
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Fri, 27 Jan 2012 23:01:35 +0000 (23:01 +0000)]
Remove Deprecated Features
Move to a model where we build whatever branches are checked out
in the source directories. This was a bit too smart (and complicated)
in handling details best left to the user and the revision control
system.
In addition, get rid of support for llvm-gcc and building gcc as
these are no longer necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149149
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 27 Jan 2012 22:42:48 +0000 (22:42 +0000)]
Revert r149110 and add a testcase that was crashing since that revision.
Unfortunately I also had to disable constant-pool-sharing.ll the code it tests has been
updated to use the IL logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149148
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 27 Jan 2012 22:36:19 +0000 (22:36 +0000)]
Add a "moveInstr" method to LiveIntervals. This can be used to move instructions
around within a basic block while maintaining live-intervals.
Updated ScheduleTopDownLive in MachineScheduler.cpp to use the moveInstr API
when reordering MIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149147
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 27 Jan 2012 21:43:32 +0000 (21:43 +0000)]
Backing out ill-considered 'refactor'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149146
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 27 Jan 2012 19:58:14 +0000 (19:58 +0000)]
Move some duplicate loops in the coalescer into their own function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149144
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 27 Jan 2012 19:48:28 +0000 (19:48 +0000)]
Intel Syntax: Parse mem operand with seg reg. QWORD PTR FS:[320]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149142
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 27 Jan 2012 18:35:03 +0000 (18:35 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149137
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 27 Jan 2012 07:09:40 +0000 (07:09 +0000)]
Move some patterns back near their instructions and use AddedComplexity to fix priority. Merge some patterns into their instruction definition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149122
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 27 Jan 2012 03:20:42 +0000 (03:20 +0000)]
Physreg dead defs should be handled too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149118
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Jan 2012 03:15:49 +0000 (03:15 +0000)]
smallvectorize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149117
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Jan 2012 03:08:05 +0000 (03:08 +0000)]
continue making the world safe for ConstantDataVector. At this point,
we should (theoretically optimize and codegen ConstantDataVector as well
as ConstantVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149116
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Fri, 27 Jan 2012 02:31:29 +0000 (02:31 +0000)]
Unix line endings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149115
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 27 Jan 2012 02:02:24 +0000 (02:02 +0000)]
Place the GEP instructions nearer to the instructions which use them.
GEP instructions are there for the compiler and shouldn't really output much
code (if any at all). When a GEP is stored in the entry block, Fast ISel (for
one) will not know that it could fold it into further uses. For instance, inside
of the EH handling code. This results in a lot of unnecessary spills and loads
which bloat code and slows down pretty much everything.
<rdar://problem/
10694814>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149114
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Jan 2012 01:47:28 +0000 (01:47 +0000)]
make sure the file's matching header is #include'd first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149113
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Jan 2012 01:46:00 +0000 (01:46 +0000)]
Rewrite CanShareConstantPoolEntry to be implemented in terms of the
mid-level constant folding APIs instead of doing its own analysis.
This makes it more general (e.g. can now share a <2 x i64> with a
<4 x i32>) and avoid duplicating a bunch of logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149111
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Jan 2012 01:44:03 +0000 (01:44 +0000)]
enhance constant folding to be able to constant fold bitcast of
ConstantVector's to integer type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149110
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 27 Jan 2012 00:51:27 +0000 (00:51 +0000)]
Keep source location information for X86 MCFixup's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149106
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 27 Jan 2012 00:51:23 +0000 (00:51 +0000)]
Source information in 'expected relocatable expression' diagnostic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149105
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 27 Jan 2012 00:37:12 +0000 (00:37 +0000)]
Better user diagnostics for more ARM MachO relocation errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149102
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 27 Jan 2012 00:37:08 +0000 (00:37 +0000)]
Better diagnostic for malformed .org assembly directive.
Provide source line number information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149101
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 27 Jan 2012 00:05:42 +0000 (00:05 +0000)]
Rewrite instruction operands in AdjustCopiesBackFrom. Fixes PR11861.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149097
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 26 Jan 2012 23:47:45 +0000 (23:47 +0000)]
Tidy up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149096
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 26 Jan 2012 23:20:15 +0000 (23:20 +0000)]
Keep source information, if available, around for ARM Fixups.
Adjust an example MachObjectWriter diagnostic to use the information
to issue a better message.
Before:
LLVM ERROR: unknown ARM fixup kind!
After:
x.s:6:5: error: unsupported relocation on symbol
beq bar
^
rdar://
9800182
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149093
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 26 Jan 2012 23:20:11 +0000 (23:20 +0000)]
Add simple support for keeping MCFixup source information.
Can be used to issue more user friendly diagnostics for faulty
relocation constructs and such.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149092
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 26 Jan 2012 23:20:07 +0000 (23:20 +0000)]
llvm-mc pass through SourceMgr to MCContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149091
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 26 Jan 2012 23:20:05 +0000 (23:20 +0000)]
Add SourceMgr to MCContext for backend diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149090
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 26 Jan 2012 22:59:28 +0000 (22:59 +0000)]
Handle call-clobbered ymm registers on Win64.
The Win64 calling convention has xmm6-15 as callee-saved while still
clobbering all ymm registers.
Add a YMM_HI_6_15 pseudo-register that aliases the clobbered part of the
ymm registers, and mark that as call-clobbered. This allows live xmm
registers across calls.
This hack wouldn't be necessary with RegisterMask operands representing
the call clobbers, but they are not quite operational yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149088
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 26 Jan 2012 22:06:23 +0000 (22:06 +0000)]
Use -H on darwin as well.
Patch by Liang Wang!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149085
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 26 Jan 2012 21:37:55 +0000 (21:37 +0000)]
progress making the world safe to ConstantDataVector. While
we're at it, allow PatternMatch's "neg" pattern to match integer
vector negations, and enhance ComputeNumSigned bits to handle
shl of vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149082
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 26 Jan 2012 20:44:57 +0000 (20:44 +0000)]
tidy up forward declarations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149078
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 26 Jan 2012 20:40:56 +0000 (20:40 +0000)]
smallvectorize and ArrayRef'ize some stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149077
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 26 Jan 2012 20:37:11 +0000 (20:37 +0000)]
Reduce a lot of code duplication by implementing
ConstantExpr::getWithOperandReplaced and ConstantExpr::replaceUsesOfWithOnConstant
in terms of ConstantExpr::getWithOperands. While we're at it,
make sure that ConstantExpr::getWithOperands covers all instructions: it was
missing insert/extractvalue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149076
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 26 Jan 2012 20:19:05 +0000 (20:19 +0000)]
Update comment for r149070.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149075
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 26 Jan 2012 18:24:25 +0000 (18:24 +0000)]
Replace the use of isPredicable() with isPredicated() in
MachineBasicBlock::canFallThrough(). We're interested in the state of the
instruction (i.e., is this a barrier or not?), not if the instruction is
predicable or not.
rdar://
10501092
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149070
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 26 Jan 2012 17:52:15 +0000 (17:52 +0000)]
Clear kill flags before propagating a copy.
The live range of the source register may be extended when a redundant
copy is eliminated. Make sure any kill flags between the two copies are
cleared.
This fixes PR11765.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149069
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 26 Jan 2012 15:56:45 +0000 (15:56 +0000)]
Tidy up. Fix mismatched return types for error handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149062
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Thu, 26 Jan 2012 10:28:58 +0000 (10:28 +0000)]
comment tweaks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149060
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Thu, 26 Jan 2012 09:25:43 +0000 (09:25 +0000)]
Add support for the R_ARM_TARGET1 relocation, which should be given to relocations applied to all C++ constructors and destructors.
This enables the linker to match concrete relocation types (absolute or relative) with whatever library or C++ support code is being linked against.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149057
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Umansky [Thu, 26 Jan 2012 08:51:39 +0000 (08:51 +0000)]
Fix for the following bug in AVX codegen for double-to-int conversions:
. "fptosi" and "fptoui" IR instructions are defined with round-to-zero rounding mode.
. Currently for AVX mode for <4xdouble> and <8xdouble> the "VCVTPD2DQ.128" and "VCVTPD2DQ.256" instructions are selected (for .fp_to_sint. DAG node operation ) by AVX codegen. However they use round-to-nearest-even rounding mode.
. Consequently, the conversion produces incorrect numbers.
The fix is to replace selection of VCVTPD2DQ instructions with VCVTTPD2DQ instructions. The latter use truncate (i.e. round-to-zero) rounding mode.
As .fp_to_sint. DAG node operation is used only for lowering of "fptosi" and "fptoui" IR instructions, the fix in X86InstrSSE.td definition file doesn.t have an impact on other LLVM flows.
The patch includes changes in the .td file, LIT test for the changes and a fix in a legacy LIT test (which produced asm code conflicting with LLVN IR spec).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149056
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 26 Jan 2012 07:51:55 +0000 (07:51 +0000)]
Add HasXOP predicate check covering a bunch of XOP intrinsic patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149054
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 26 Jan 2012 07:31:30 +0000 (07:31 +0000)]
Fix AVX vs SSE patterns ordering issue for VPCMPESTRM and VPCMPISTRM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149053
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 26 Jan 2012 07:18:03 +0000 (07:18 +0000)]
Remove some more patterns by custom lowering intrinsics to target specific nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149052
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 26 Jan 2012 03:10:45 +0000 (03:10 +0000)]
unbreak test/Bitcode/shuffle.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149033
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 26 Jan 2012 02:54:54 +0000 (02:54 +0000)]
simplify by using ShuffleVectorInst::getMaskValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149029
91177308-0d34-0410-b5e6-
96231b3b80d8