Nick Lewycky [Sun, 22 May 2011 05:31:47 +0000 (05:31 +0000)]
Commit test change, forgotten as part of r131838.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131839
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 22 May 2011 05:22:10 +0000 (05:22 +0000)]
Teach the inliner to emit llvm.lifetime.start/end, to scope the local variables
of the inlinee to the code representing the original function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131838
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 May 2011 04:53:24 +0000 (04:53 +0000)]
switch to using a smallvector to avoid allocations for most normal size instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131837
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 May 2011 04:52:24 +0000 (04:52 +0000)]
tidy some things up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131836
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 May 2011 04:44:48 +0000 (04:44 +0000)]
Fix some minor typos and grammar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131835
91177308-0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Sun, 22 May 2011 04:15:07 +0000 (04:15 +0000)]
Implement emission of all Win64 exception tables. Make the COFF streamer emit
these tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131833
91177308-0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Sun, 22 May 2011 03:01:05 +0000 (03:01 +0000)]
Make the COFF streamer emit unwind info when processing a .seh_handlerdata
directive.
Implement emission of Win64 EH unwind info.
Pull in <cassert> in MCWin64EH.h so it can use the assert() macro.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131832
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 22 May 2011 01:16:00 +0000 (01:16 +0000)]
Fix grammar in test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131831
91177308-0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Sun, 22 May 2011 00:56:20 +0000 (00:56 +0000)]
Don't allow unaligned offsets and sizes in the Win64 EH directives.
Also, fix threshold for 'Big' register saves.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131830
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 May 2011 00:50:53 +0000 (00:50 +0000)]
random comment cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131829
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 May 2011 00:37:51 +0000 (00:37 +0000)]
fix a file system case sensitivity issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131828
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 May 2011 00:30:45 +0000 (00:30 +0000)]
remove StandardPasses, it has been replaced with PassManagerBuilder
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131827
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 May 2011 00:21:33 +0000 (00:21 +0000)]
switch opt to using PassManagerBuilder.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131824
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 May 2011 00:21:15 +0000 (00:21 +0000)]
switch llvm-ld. It has a terrible mechanism that people can add extra
passes, it should be converted to use extension points.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131823
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 May 2011 00:20:07 +0000 (00:20 +0000)]
switch bugpoint and liblto to PassManagerBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131821
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 May 2011 00:14:20 +0000 (00:14 +0000)]
add support for LTO passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131820
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 May 2011 00:13:44 +0000 (00:13 +0000)]
eliminate dependence on StandardPasses.h. The code generator's pass pipeline
should eventually convert to PMBuilder, but I don't plan to do this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131819
91177308-0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Sun, 22 May 2011 00:05:26 +0000 (00:05 +0000)]
Include DataTypes.h from this header to get the uint*_t types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131817
91177308-0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Sun, 22 May 2011 00:03:24 +0000 (00:03 +0000)]
Allow access to the .pdata and .xdata sections through the TargetAsmInfo
class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131816
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 21 May 2011 23:50:37 +0000 (23:50 +0000)]
add an extension point mechanism that allow plugins to add stuff to
the pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131814
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 21 May 2011 23:14:36 +0000 (23:14 +0000)]
Add CreateLifetimeStart and CreateLifetimeEnd to the IRBuilder, with plans to
use these soon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131812
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sat, 21 May 2011 20:54:46 +0000 (20:54 +0000)]
Revert commit 131781, to see if it fixes the x86-64 dragonegg buildbot.
Original log message:
When BasicAA can determine that two pointers have the same base but
differ by a dynamic offset, return PartialAlias instead of MayAlias.
See the comment in the code for details. This fixes PR9971.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131809
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 21 May 2011 20:39:42 +0000 (20:39 +0000)]
add a new PassManagerBuilder class to replace StandardPasses.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131807
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 21 May 2011 20:09:13 +0000 (20:09 +0000)]
add a copy ctor to TargetLibraryInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131806
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 21 May 2011 19:13:10 +0000 (19:13 +0000)]
PR7952: Make isa<> use the same logic as cast<>, so that they both work
consistently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131803
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 21 May 2011 18:32:01 +0000 (18:32 +0000)]
X86: smulo -> add is now done target-independently in DAGCombiner, remove the patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131801
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 21 May 2011 18:31:55 +0000 (18:31 +0000)]
Implement mulo x, 2 -> addo x, x in DAGCombiner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131800
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 21 May 2011 18:31:48 +0000 (18:31 +0000)]
Merge and FileCheckize test cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131799
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 21 May 2011 18:31:42 +0000 (18:31 +0000)]
Revert "InstCombine: Turn mul.with.overflow(X, 2) into the cheaper add.with.overflow(X, X)"
It's better to do this in codegen, mul.with.overflow(X, 2) is more canonical because it has only one use on "X".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131798
91177308-0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Sat, 21 May 2011 17:36:25 +0000 (17:36 +0000)]
Don't allow .seh_handler and .seh_handlerdata directives inside chained
unwind areas.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131795
91177308-0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Sat, 21 May 2011 15:57:49 +0000 (15:57 +0000)]
A handler for a function in the Win64 EH scheme can be both an unwind handler
and an exception handler. Handle that case.
Also, add an 'Emitted' member to the MCWin64EHUnwindInfo struct. It will be
needed later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131791
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 21 May 2011 09:22:06 +0000 (09:22 +0000)]
InstCombine: Turn mul.with.overflow(X, 2) into the cheaper add.with.overflow(X, X)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131789
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Sat, 21 May 2011 04:13:49 +0000 (04:13 +0000)]
Fix PR9978 by adding RIP to GR64_TC so it can be used as an address in PIC code. It
is already in GR64 for the same reasons. Since it isn't allocatable it can't cause
any problems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131787
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 21 May 2011 03:01:03 +0000 (03:01 +0000)]
Use the correct register to access stack frame objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131785
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 21 May 2011 02:29:26 +0000 (02:29 +0000)]
Insert instructions that copy $sp to or from $fp at the right locations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131784
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 21 May 2011 01:05:08 +0000 (01:05 +0000)]
When BasicAA can determine that two pointers have the same base but
differ by a dynamic offset, return PartialAlias instead of MayAlias.
See the comment in the code for details. This fixes PR9971.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131781
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 21 May 2011 00:56:46 +0000 (00:56 +0000)]
Have Program::Wait return -2 for crashed and timeouts instead of embedding
info in the error message. Per Dan's request.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131780
91177308-0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Sat, 21 May 2011 00:09:04 +0000 (00:09 +0000)]
Set the "LastFrameInst" field when streaming a .seh_setframe directive. This
is needed for an upcoming patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131772
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Fri, 20 May 2011 23:25:36 +0000 (23:25 +0000)]
Fix PR9962 by properly constraining register classes in RemoveCopyByCommutingDef(). This
actually fixes most of the VerifyCoalescing failures in test-suite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131768
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 20 May 2011 23:22:14 +0000 (23:22 +0000)]
Change the order fixed objects are created in MipsTargetLowering::LowerCall in
preparation for reversing StackDirection.
Fixed objects are created in the following order:
1. Incoming arguments passed on stack.
2. va_arg objects (include both arguments that are passed in registers and
pointer to the location of the first va_arg argument).
3. $gp restore slot.
4. Outgoing arguments passed on stack.
5. Pointer to alloca'd space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131767
91177308-0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Fri, 20 May 2011 22:23:34 +0000 (22:23 +0000)]
Fix typo. When will I learn?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131765
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 20 May 2011 22:21:04 +0000 (22:21 +0000)]
Add fast-isel support for byval calls on x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131764
91177308-0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Fri, 20 May 2011 22:13:55 +0000 (22:13 +0000)]
Add .pdata and .xdata sections to the COFF TLOF implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131763
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 20 May 2011 21:50:09 +0000 (21:50 +0000)]
No reason not to allow defining the CFA as a reg w/ offset zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131760
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 20 May 2011 21:39:54 +0000 (21:39 +0000)]
In CC_MipsO32, allocate a stack space regardless of whether the argument is
passed in register or on the stack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131758
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 20 May 2011 21:35:39 +0000 (21:35 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131757
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 20 May 2011 21:23:17 +0000 (21:23 +0000)]
Add support for frame info use of the .cfi_def_cfa directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131756
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 20 May 2011 21:22:37 +0000 (21:22 +0000)]
Add missing leading \t when printing .cfi_def_cfa in the asmstreamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131755
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 20 May 2011 20:11:17 +0000 (20:11 +0000)]
Define functions that get/set maximum call frame size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131752
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 20 May 2011 20:10:34 +0000 (20:10 +0000)]
adds some attributes to attribute section when cpu is "xscale"
(this is what used in Android NDK, when architecture is ARMv5)
patch by Koan-Sin Tan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131751
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 20 May 2011 20:01:01 +0000 (20:01 +0000)]
fixes target address tBL and tBLX and sets relocation type
of tBL/tBLX to R_ARM_THM_CALL (ARM ELF 4.7.1.6)
Patch by koan-sin tan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131748
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 20 May 2011 19:24:12 +0000 (19:24 +0000)]
Add asserts in StringRef to make sure we avoid undefined behavior:
-strlen should not be called with NULL. Also guarantee that StringRef's Length is 0 if Data is NULL.
-memcmp should not be called with NULL (even if size is 0)
Patch by Matthieu Monrocq!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131747
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Fri, 20 May 2011 19:04:40 +0000 (19:04 +0000)]
Re-commit 131641 with fixes; de-pseudoize MOVSX16rr8 and friends.
rdar://problem/
8614450
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131746
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 20 May 2011 18:39:33 +0000 (18:39 +0000)]
Make $fp and $ra callee-saved registers and let PrologEpilogInserter handle
saving and restoring them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131745
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 20 May 2011 18:25:42 +0000 (18:25 +0000)]
indvars: Prototyping Sign/ZeroExtend elimination without canonical IVs.
No functionality enabled by default. Use -disable-iv-rewrite.
Extended IVUsers to keep track of the phi that represents the users' IV.
Added the WidenIV transform to replace a narrow IV with a wide IV
by doing a one-for-one replacement of IV users instead of expanding the
SCEV expressions. [sz]exts are removed and truncs are inserted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131744
91177308-0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Fri, 20 May 2011 18:19:22 +0000 (18:19 +0000)]
Now that they're implemented, make the Win64 EH MCAsmStreamer methods call
super.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131743
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 20 May 2011 17:49:39 +0000 (17:49 +0000)]
Fixed regression due to commit 131709, which disables vararg tail call optimizations on Win64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131740
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 20 May 2011 17:38:48 +0000 (17:38 +0000)]
Revert accidental commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131739
91177308-0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Fri, 20 May 2011 16:06:22 +0000 (16:06 +0000)]
"Implement" the HandlerData Win64 EH method in the base MCStreamer.
There's really nothing to implement. All this really does is swap to a
pseudo-section that later gets written to the unwind info struct. That
needs to be implemented in the object streamers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131734
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 20 May 2011 15:11:26 +0000 (15:11 +0000)]
Rename the "sandybridge" subtarget to "corei7-avx", for GCC compatibility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131730
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 20 May 2011 09:20:25 +0000 (09:20 +0000)]
Remove noisy semicolons.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131724
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Fri, 20 May 2011 03:54:04 +0000 (03:54 +0000)]
Fix PR9960 by teaching SimpleRegisterCoalescing::AdjustCopiesBackFrom() to preserve
the phikill flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131717
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 20 May 2011 03:37:48 +0000 (03:37 +0000)]
indvars: minor cleanup in preparation for sign/zero extend elimination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131716
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 20 May 2011 02:30:51 +0000 (02:30 +0000)]
Fix bug in which nodes that write to argument registers do not get glued with the JALR node. Patch by Sasa Stankovic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131714
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 20 May 2011 01:45:06 +0000 (01:45 +0000)]
Remove code that creates unnecessary frame objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131711
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 20 May 2011 01:17:58 +0000 (01:17 +0000)]
Define variables and functions in MipsFunctionInfo.
This is the first of a series of patches that attempt to simplify handling of
stack frame objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131710
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 20 May 2011 00:59:28 +0000 (00:59 +0000)]
Don't attempt to tail call optimize for Win64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131709
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 20 May 2011 00:54:37 +0000 (00:54 +0000)]
Revert r131664 and fix it in instcombine instead. rdar://
9467055
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131708
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Thu, 19 May 2011 23:44:34 +0000 (23:44 +0000)]
Fix PR9955 by only attaching load memory operands to load instructions and
similarly for stores. Now "make check" passes with the MachineVerifier forced
on with the VerifyCoalescing option!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131705
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 19 May 2011 22:16:13 +0000 (22:16 +0000)]
Add fast-isel support for zeroext and signext ret instructions on x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131689
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 19 May 2011 22:05:56 +0000 (22:05 +0000)]
Looks like OS X assemblers (including MC) don't like
foo:
bar = foo
.quad bar
Avoid producing it. Fixes PR9951.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131687
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 19 May 2011 21:40:34 +0000 (21:40 +0000)]
Misc code refactorings:
* Remove unnecessary arguments now that ForceExpAbs is a method.
* Use ForceExpAbs in EmitAbsValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131683
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 19 May 2011 21:33:47 +0000 (21:33 +0000)]
Oddly people want to use the 'r' constraint for fp constants on x86.
Fixes rdar://
9218925
Fixes PR9601
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131682
91177308-0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Thu, 19 May 2011 21:24:54 +0000 (21:24 +0000)]
Implement the EndProlog Win64 EH method on the base MCStreamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131679
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Thu, 19 May 2011 21:13:30 +0000 (21:13 +0000)]
Fix PR9947 by placing OPFL_MemRefs on the node using memory operands rather than
the root if there is only one such node. This leaves only 2 verifier failures in
the entire test suite when running "make check".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131677
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 19 May 2011 21:13:08 +0000 (21:13 +0000)]
Fix up this test to use explicit triples (Win64 passes a different number of arguments in registers).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131676
91177308-0d34-0410-b5e6-
96231b3b80d8
Jason W Kim [Thu, 19 May 2011 20:55:25 +0000 (20:55 +0000)]
This fixes one divergence between LLVM and binutils for ARM in the
text section.
Assume the following bit of annotated assembly:
.section .data.rel.ro,"aw",%progbits
.align 2
.LAlpha:
.long startval(GOTOFF)
.text
.align 2
.type main,%function
.align 4
main: ;;; assume "main" starts at offset 0x20
0x0 push {r11, lr}
0x4 movw r0, :lower16:(.LAlpha-(.LBeta+8))
;;; ==> (.AddrOf(.LAlpha) - ((.AddrOf(.LBeta) - .AddrOf(".")) + 8)
;;; ==> (??? - ((16-4) + 8) = -20
0x8 movt r0, :upper16:(.LAlpha-(.LBeta+8))
;;; ==> (.AddrOf(.LAlpha) - ((.AddrOf(.LBeta) - .AddrOf(".")) + 8)
;;; ==> (??? - ((16-8) + 8) = -16
0xc ... blah
.LBeta:
0x10 add r0, pc, r0
0x14 ... blah
.LGamma:
0x18 add r1, pc, r1
Above snippet results in the following relocs in the .o file for the
first pair of movw/movt instructions
00000024 R_ARM_MOVW_PREL_NC .LAlpha
00000028 R_ARM_MOVT_PREL .LAlpha
And the encoded instructions in the .o file for main: must be
00000020 <main>:
20:
e92d4800 push {fp, lr}
24:
e30f0fec movw r0, #65516 ; 0xffec i.e. -20
28:
e34f0ff0 movt r0, #65520 ; 0xfff0 i.e. -16
However, llc (prior to this commit) generates the following sequence
00000020 <main>:
20:
e92d4800 push {fp, lr}
24:
e30f0fec movw r0, #65516 ; 0xffec - i.e. -20
28:
e34f0fff movt r0, #65535 ; 0xffff - i.e. -1
What has to happen in the ArmAsmBackend is that if the relocation is PC
relative, the 16 bits encoded as part of movw and movt must be both addends,
not addresses. It makes sense to encode addresses by right shifting the value
by 16, but the result is incorrect for PIC.
i.e., the right shift by 16 for movt is ONLY valid for the NON-PCRel case.
This change agrees with what GNU as does, and makes the PIC code run.
MC/ARM/elf-movt.s covers this case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131674
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 19 May 2011 20:52:46 +0000 (20:52 +0000)]
Reapply r131605. This time with a fix, which is to use NoFolder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131673
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 19 May 2011 20:32:34 +0000 (20:32 +0000)]
ADD64ri32 sign extends its argument, so we need to use a R_X86_64_32S.
Fixes PR9934.
We really need to start tblgening the relocation info :-(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131669
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 19 May 2011 20:29:48 +0000 (20:29 +0000)]
Align i64 arguments to 64 bit boundaries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131668
91177308-0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Thu, 19 May 2011 19:35:55 +0000 (19:35 +0000)]
Implement the Win64 EH prolog instruction methods on the base MCStreamer.
I had to change the API slightly to avoid overloading issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131666
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 19 May 2011 19:14:54 +0000 (19:14 +0000)]
Fix up the new StandardPasses to run the same scalarrepl passes as the old one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131665
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 19 May 2011 18:57:12 +0000 (18:57 +0000)]
crc32 with 64-bit output zeros upper 32-bits. rdar://
9467055
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131664
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Thu, 19 May 2011 18:48:20 +0000 (18:48 +0000)]
Update some currently-disabled code, preparing for eventual use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131663
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 19 May 2011 18:25:03 +0000 (18:25 +0000)]
Increase number of available registers when target is MIPS32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131660
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 19 May 2011 18:18:39 +0000 (18:18 +0000)]
Add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131659
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 19 May 2011 18:06:05 +0000 (18:06 +0000)]
Simplify CC_MipsO32 and merge it with CC_MipsO32_VarArgs. Patch by Sasa Stankovic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131657
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Thu, 19 May 2011 18:00:13 +0000 (18:00 +0000)]
Reapply 131644 including the missing header changes:
Introduce -fatal-assembler-warnings for the obvious purpose
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131655
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Thu, 19 May 2011 17:54:42 +0000 (17:54 +0000)]
Reverting 131641 to investigate 'bot complaint.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131654
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 19 May 2011 17:48:09 +0000 (17:48 +0000)]
Revert r131644; it's breaking the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131653
91177308-0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Thu, 19 May 2011 17:46:39 +0000 (17:46 +0000)]
Turns out GAS does have Win64 EH directives. (It also supports WinCE EH.) Make
ours compatible with GAS.
In retrospect, I should have emailed binutils about this earlier. Thanks to
Kai Tietz for pointing out that GAS already had SEH directives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131652
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 19 May 2011 17:34:53 +0000 (17:34 +0000)]
80 columns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131649
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Thu, 19 May 2011 17:27:01 +0000 (17:27 +0000)]
Introduce -fatal-assembler-warnings for the obvious purpose
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131644
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 19 May 2011 17:21:09 +0000 (17:21 +0000)]
Fix data layout string. i64 is aligned to 64 bit boundaries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131642
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Thu, 19 May 2011 16:59:50 +0000 (16:59 +0000)]
Revise MOVSX16rr8/MOVZX16rr8 (and rm variants) to no longer be
pseudos. rdar://problem/
8614450
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131641
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Thu, 19 May 2011 05:53:22 +0000 (05:53 +0000)]
Move test to Transforms/InstCombine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131634
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Thu, 19 May 2011 04:44:19 +0000 (04:44 +0000)]
Use the correct register class for Cell varargs spilling. This fixes all of the
verifier failures in the CodeGen/CellSPU tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131631
91177308-0d34-0410-b5e6-
96231b3b80d8
Mon P Wang [Thu, 19 May 2011 04:15:07 +0000 (04:15 +0000)]
Fixed sdiv and udiv for <4 x i16>. The test from r125402 still applies for this change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131630
91177308-0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Thu, 19 May 2011 04:04:13 +0000 (04:04 +0000)]
Implement the StartChained and EndChained Win64 EH methods on MCStreamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131629
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Thu, 19 May 2011 03:11:06 +0000 (03:11 +0000)]
Make CodeGen/PowerPC/2007-09-11-RegCoalescerAssert.ll pass with the verifier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131627
91177308-0d34-0410-b5e6-
96231b3b80d8