Eric Christopher [Sun, 3 Apr 2011 22:34:07 +0000 (22:34 +0000)]
Add a set of C bindings for the Object interface.
Patch by Patrick Walton!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128798
91177308-0d34-0410-b5e6-
96231b3b80d8
Frits van Bommel [Sun, 3 Apr 2011 19:46:28 +0000 (19:46 +0000)]
Remove the LLVMContext& arguments from *Folder constructors, as they don't seem to be used anywhere.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128793
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Sun, 3 Apr 2011 16:12:38 +0000 (16:12 +0000)]
Fix typos on LLVM.cmake. Export LLVM_ON_UNIX & LLVM_ON_WIN32.
Patch by arrowdodger!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128789
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 2 Apr 2011 22:45:17 +0000 (22:45 +0000)]
PR9446: RecursivelyDeleteTriviallyDeadInstructions can delete the instruction
after the given instruction; make sure to handle that case correctly.
(It's difficult to trigger; the included testcase involves a dead
block, but I don't think that's a requirement.)
While I'm here, get rid of the unnecessary warning about
SimplifyInstructionsInBlock, since it should work correctly as far as I know.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128782
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 2 Apr 2011 22:11:56 +0000 (22:11 +0000)]
Don't assume something which might be a constant expression is an instruction.
Based on PR9429, but no testcase because I can't figure out how to trigger it
anymore given other changes to the relevant code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128781
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 2 Apr 2011 18:50:58 +0000 (18:50 +0000)]
While SimplifyDemandedBits constant folds this, we can't rely on it here.
It's possible to craft an input that hits the recursion limits in a way
that SimplifyDemandedBits doesn't simplify the icmp but ComputeMaskedBits
can infer which bits are zero.
No test case as it depends on too many other things. Fixes PR9609.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128777
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Sat, 2 Apr 2011 13:21:12 +0000 (13:21 +0000)]
Handle changing of LLVM_ENABLE_FFI.
If someone first configure build with LLVM_ENABLE_FFI=1 and then turn it
off, the build will fail in lib/ExecutionEngine/Interpreter because
Interpreter will try still to #include <ffi/ffi.h>, but there are no
include_directories(${FFI_INCLUDE_DIR}) now.
This patch unset()'s HAVE_FFI_H and HAVE_FFI_FFI_H from cache file if
LLVM_ENABLE_FFI=0. This forces CMake to update config.h.
Patch by arrowdodger!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128769
91177308-0d34-0410-b5e6-
96231b3b80d8
Che-Liang Chiou [Sat, 2 Apr 2011 08:51:39 +0000 (08:51 +0000)]
ptx: support setp's 4-operand format
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128767
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 2 Apr 2011 06:03:38 +0000 (06:03 +0000)]
Use InterferenceCache in RegAllocGreedy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128765
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 2 Apr 2011 06:03:35 +0000 (06:03 +0000)]
Add an InterferenceCache class for caching per-block interference ranges.
When the greedy register allocator is splitting multiple global live ranges, it
tends to look at the same interference data many times. The InterferenceCache
class caches queries for unaltered LiveIntervalUnions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128764
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 2 Apr 2011 06:03:31 +0000 (06:03 +0000)]
Use basic block numbers as indexes when mapping slot index ranges.
This is more compact and faster than using DenseMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128763
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Sat, 2 Apr 2011 02:40:43 +0000 (02:40 +0000)]
Do some peephole optimizations to remove pointless VMOVs from Neon to integer
registers that arise from argument shuffling with the soft float ABI. These
instructions are particularly slow on Cortex A8. This fixes one half of
<rdar://problem/
8674845>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128759
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Sat, 2 Apr 2011 02:40:26 +0000 (02:40 +0000)]
Add a RemoveFromWorklist method to DCI. This is needed to do some complicated
transformations in target-specific DAG combines without causing DAGCombiner to
delete the same node twice. If you know of a better way to avoid this (see my
next patch for an example), please let me know.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128758
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Sat, 2 Apr 2011 02:24:54 +0000 (02:24 +0000)]
Fixed a bug in disassembly of STR_POST, where the immediate is the second operand in am2offset;
instead of the second operand in addrmode_imm12.
rdar://problem/
9225289
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128757
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 2 Apr 2011 00:26:12 +0000 (00:26 +0000)]
Undo changes mistakenly made in revision 128750.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128751
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 2 Apr 2011 00:15:58 +0000 (00:15 +0000)]
Insert space before ';' to prevent warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128750
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Fri, 1 Apr 2011 23:30:25 +0000 (23:30 +0000)]
Fixed MOVr for "should be" encoding bits for Inst{19-16} = 0b0000.
rdar://problem/
9224276
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128749
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Fri, 1 Apr 2011 23:15:50 +0000 (23:15 +0000)]
MOVs should have Inst{19-16} as 0b0000, otherwise, the instruction is UNPREDICTABLE.
rdar://problem/
9224120
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128748
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Fri, 1 Apr 2011 22:32:51 +0000 (22:32 +0000)]
Fix the instruction table entries for AI1_adde_sube_s_irs multiclass definition so that
all the instruction have:
let Inst{31-27} = 0b1110; // non-predicated
Before, the ARM decoder was confusing:
> 0x40 0xf3 0xb8 0x80
as:
Opcode=16 Name=ADCSSrs Format=ARM_FORMAT_DPSOREGFRM(5)
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
-------------------------------------------------------------------------------------------------
| 1: 0: 0: 0| 0: 0: 0: 0| 1: 0: 1: 1| 1: 0: 0: 0| 1: 1: 1: 1| 0: 0: 1: 1| 0: 1: 0: 0| 0: 0: 0: 0|
-------------------------------------------------------------------------------------------------
adcs pc, r8, r0, asr #6
since the cond field for ADCSSrs is a wild card, and so is ADCrs, with the ADCSSrs having Inst{20} as '1'.
Now, the AR decoder behaves correctly:
> 0x40 0xf3 0xb8 0x80
> END
Executing command: /Volumes/data/lldb/llvm/Debug+Asserts/bin/llvm-mc -disassemble -triple=arm-apple-darwin -debug-only=arm-disassembler mc-input.txt
Opcode=19 Name=ADCrs Format=ARM_FORMAT_DPSOREGFRM(5)
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
-------------------------------------------------------------------------------------------------
| 1: 0: 0: 0| 0: 0: 0: 0| 1: 0: 1: 1| 1: 0: 0: 0| 1: 1: 1: 1| 0: 0: 1: 1| 0: 1: 0: 0| 0: 0: 0: 0|
-------------------------------------------------------------------------------------------------
adcshi pc, r8, r0, asr #6
>
rdar://problem/
9223094
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128746
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 1 Apr 2011 22:29:18 +0000 (22:29 +0000)]
Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128745
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 1 Apr 2011 22:22:11 +0000 (22:22 +0000)]
Tweaks to the icmp+sext-to-shifts optimization to address Frits' comments:
- Localize the check if an icmp has one use to a place where we know we're
introducing something that's likely more expensive than a sext from i1.
- Add an assert to make sure a case that would lead to a miscompilation is
folded away earlier.
- Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128744
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 1 Apr 2011 22:09:28 +0000 (22:09 +0000)]
Avoid de-referencing pass beginning of a basic block. No small test case possible. rdar://
9216009
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128743
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 1 Apr 2011 21:56:02 +0000 (21:56 +0000)]
Remove redundant code. There are assignments to variables Base and Offset right after the code that is removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128742
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 1 Apr 2011 21:41:06 +0000 (21:41 +0000)]
Simplifies logic for printing target flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128741
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Fri, 1 Apr 2011 21:39:38 +0000 (21:39 +0000)]
CMake: remove debug code from previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128740
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 1 Apr 2011 21:07:39 +0000 (21:07 +0000)]
When the architecture is explicitly armv6 or thumbv6, we need to mark the object file appropriately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128739
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 1 Apr 2011 20:26:57 +0000 (20:26 +0000)]
LDRD/STRD instructions should print both Rt and Rt2 in the asm string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128736
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 1 Apr 2011 20:23:52 +0000 (20:23 +0000)]
tlbgen/MC: StringRef's to temporary objects considered harmful.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128735
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Fri, 1 Apr 2011 20:21:38 +0000 (20:21 +0000)]
Fix a LDRT/LDRBT decoding bug where for Encoding A2, if Inst{4} != 0, we should reject the instruction
as invalid.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128734
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 1 Apr 2011 20:15:16 +0000 (20:15 +0000)]
Fix build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128733
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 1 Apr 2011 20:09:10 +0000 (20:09 +0000)]
InstCombine: Turn icmp + sext into bitwise/integer ops when the input has only one unknown bit.
int test1(unsigned x) { return (x&8) ? 0 : -1; }
int test3(unsigned x) { return (x&8) ? -1 : 0; }
before (x86_64):
_test1:
andl $8, %edi
cmpl $1, %edi
sbbl %eax, %eax
ret
_test3:
andl $8, %edi
cmpl $1, %edi
sbbl %eax, %eax
notl %eax
ret
after:
_test1:
shrl $3, %edi
andl $1, %edi
leal -1(%rdi), %eax
ret
_test3:
shll $28, %edi
movl %edi, %eax
sarl $31, %eax
ret
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128732
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 1 Apr 2011 20:09:03 +0000 (20:09 +0000)]
InstCombine: Move (sext icmp) transforms into their own method. No intended functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128731
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 1 Apr 2011 19:57:01 +0000 (19:57 +0000)]
Add comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128730
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 1 Apr 2011 19:42:22 +0000 (19:42 +0000)]
Assign node order numbers to results of call instruction lowering. This should improve src line debug info when sdisel is used. rdar://
9199118
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128728
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Fri, 1 Apr 2011 19:36:06 +0000 (19:36 +0000)]
Fix assignment of -fPIC to CMAKE_C_FLAGS. Configure llvm-config.in.in
with the contents of CMAKE_C(XX)_FLAGS too, else `llvm-config
--c(xx)flags' doesn't tell the absolute truth.
This comes from PR9603 and is based on a patch by Ryuta Suzuki!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128727
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 1 Apr 2011 18:57:38 +0000 (18:57 +0000)]
Modifies MipsAsmPrinter::isBlockOnlyReachableByFallthrough so that it handles delay slots correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128724
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Fri, 1 Apr 2011 18:26:38 +0000 (18:26 +0000)]
Fix LDRi12 immediate operand, which was changed to be the second operand in $addrmode_imm12 => (ops GPR:$base, i32imm:$offsimm).
rdar://problem/
9219356
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128722
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 1 Apr 2011 18:03:58 +0000 (18:03 +0000)]
Update CMakeLists.txt
Patch by arrowdoger.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128719
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 1 Apr 2011 17:39:08 +0000 (17:39 +0000)]
Add code for analyzing FP branches. Clean up branch Analysis functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128718
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 1 Apr 2011 09:20:31 +0000 (09:20 +0000)]
Initialize HasVMLxForwarding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128709
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Fri, 1 Apr 2011 08:00:58 +0000 (08:00 +0000)]
Various Instructions' resizeOperands() methods are only used to grow the
list of operands. Simplify and rename them accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128708
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 1 Apr 2011 06:27:25 +0000 (06:27 +0000)]
Add test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128707
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 1 Apr 2011 03:36:33 +0000 (03:36 +0000)]
FileCheck'ify test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128706
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 1 Apr 2011 03:34:54 +0000 (03:34 +0000)]
While testing dragonegg I noticed that isCastable and getCastOpcode
had gotten out of sync: isCastable didn't think it was possible to
cast the x86_mmx type to anything, while it did think it possible
to cast an i64 to x86_mmx.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128705
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 1 Apr 2011 02:22:47 +0000 (02:22 +0000)]
Add annotations to tablegen-generated processor itineraries, or replace them with something meaningful. I want to be able to read and debug the generated tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128703
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 1 Apr 2011 01:56:55 +0000 (01:56 +0000)]
whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128701
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 1 Apr 2011 00:42:02 +0000 (00:42 +0000)]
Issue libcalls __udivmod*i4 / __divmod*i4 for div / rem pairs.
rdar://
8911343
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128696
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Fri, 1 Apr 2011 00:06:01 +0000 (00:06 +0000)]
Remove unused variables
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128692
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 31 Mar 2011 23:31:50 +0000 (23:31 +0000)]
Fix Thumb and Thumb2 tests to be register allocator independent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128690
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Thu, 31 Mar 2011 23:26:08 +0000 (23:26 +0000)]
Apply again changes to support ARM memory asm parsing. I removed
all LDR/STR changes and left them to a future patch. Passing all
checks now.
- Implement asm parsing support for LDRT, LDRBT, STRT, STRBT and
fix the encoding wherever is possible.
- Add a new encoding bit to describe the index mode used and teach
printAddrMode2Operand to check by the addressing mode which index
mode to print.
- Testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128689
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 31 Mar 2011 23:02:17 +0000 (23:02 +0000)]
The basic register allocator must also use the inline spiller.
It is using a trivial rewriter that doesn't know how to insert spill code
requested by the standard spiller.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128688
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 31 Mar 2011 23:02:15 +0000 (23:02 +0000)]
Provide a legal pointer register class when targeting thumb1.
The LocalStackSlotAllocation pass was creating illegal registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128687
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 31 Mar 2011 23:02:12 +0000 (23:02 +0000)]
Fix SystemZ tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128686
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 31 Mar 2011 22:57:29 +0000 (22:57 +0000)]
Instcombile optimization: extractelement(cast) -> cast(extractelement)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128683
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 31 Mar 2011 22:14:03 +0000 (22:14 +0000)]
Fix ARM tests to be register allocator independent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128680
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 31 Mar 2011 21:35:49 +0000 (21:35 +0000)]
InstCombine: APFloat can't perform arithmetic on PPC double doubles, don't even try.
Thanks Eli!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128676
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Thu, 31 Mar 2011 20:54:30 +0000 (20:54 +0000)]
Add a test case for a malformed LDC/LDC2 instructions with PUDW = 0b0000, which
amounts to an UNDEFINED instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128668
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 31 Mar 2011 19:38:48 +0000 (19:38 +0000)]
Distribute (A + B) * C to (A * C) + (B * C) to make use of NEON multiplier
accumulator forwarding:
vadd d3, d0, d1
vmul d3, d3, d2
=>
vmul d3, d0, d2
vmla d3, d1, d2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128665
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Thu, 31 Mar 2011 19:28:35 +0000 (19:28 +0000)]
Fix single word and unsigned byte data transfer instruction encodings so that
Inst{4} = 0.
rdar://problem/
9213022
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128662
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 31 Mar 2011 18:42:43 +0000 (18:42 +0000)]
Fix Mips, Sparc, and XCore tests that were dependent on register allocation.
Add an extra run with -regalloc=basic to keep them honest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128654
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 31 Mar 2011 18:26:17 +0000 (18:26 +0000)]
Added support for FP conditional move instructions and fixed bugs in handling of FP comparisons.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128650
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 31 Mar 2011 18:20:19 +0000 (18:20 +0000)]
Pick better examples. "fpext float 3.1415 to double" won't parse because 3.1415
isn't an exact float. Also "fpext float 1.0 to float" is invalid IR because
it's not performing an extension.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128647
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 31 Mar 2011 17:55:25 +0000 (17:55 +0000)]
Don't completely eliminate identity copies that also modify super register liveness.
Turn them into noop KILL instructions instead. This lets the scavenger know when
super-registers are killed and defined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128645
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Thu, 31 Mar 2011 17:53:50 +0000 (17:53 +0000)]
Add BLXi to the instruction table for disassembly purpose.
A8.6.23 BLX (immediate)
rdar://problem/
9212921
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128644
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 31 Mar 2011 17:52:41 +0000 (17:52 +0000)]
Allow kill flags on two-address instructions. They are harmless.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128643
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 31 Mar 2011 17:23:25 +0000 (17:23 +0000)]
Mark all uses as <undef> when joining a copy.
This way, shrinkToUses() will ignore the instruction that is about to be
deleted, and we avoid leaving invalid live ranges that SplitKit doesn't like.
Fix a misunderstanding in MachineVerifier about <def,undef> operands. The
<undef> flag is valid on def operands where it has the same meaning as <undef>
on a use operand. It only applies to sub-register defines which also read the
full register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128642
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 31 Mar 2011 17:01:56 +0000 (17:01 +0000)]
Remove stray empty test file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128640
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 31 Mar 2011 16:53:49 +0000 (16:53 +0000)]
Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128639
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Thu, 31 Mar 2011 15:54:36 +0000 (15:54 +0000)]
Revert r128632 again, until I figure out what break the tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128635
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 31 Mar 2011 15:14:11 +0000 (15:14 +0000)]
Fix bug found by valgrind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128634
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Thu, 31 Mar 2011 15:13:13 +0000 (15:13 +0000)]
Add XCore intrinsics for initializing / starting / synchronizing threads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128633
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Thu, 31 Mar 2011 14:52:28 +0000 (14:52 +0000)]
Reapply r128585 without generating a lib depedency cycle. An updated log:
- Implement asm parsing support for LDRT, LDRBT, STRT, STRBT and
{STR,LDC}{2}_{PRE,POST} fixing the encoding wherever is possible.
- Move all instructions which use am2offset without a pattern to use
addrmode2.
- Add a new encoding bit to describe the index mode used and teach
printAddrMode2Operand to check by the addressing mode which index
mode to print.
- Testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128632
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Thu, 31 Mar 2011 13:06:39 +0000 (13:06 +0000)]
Fix whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128631
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Thu, 31 Mar 2011 13:04:19 +0000 (13:04 +0000)]
Switch FileRemover from PathV1 to V2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128630
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 31 Mar 2011 12:11:33 +0000 (12:11 +0000)]
lib/CodeGen/LiveIntervalAnalysis.cpp: [PR9590] Don't use std::pow(float,float) here.
We don't expect the real "powf()" on some hosts (and powf() would be available on other hosts).
For consistency, std::pow(double,double) may be called instead.
Or, precision issue might attack us, to see unstable regalloc and stack coloring.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128629
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 31 Mar 2011 10:46:03 +0000 (10:46 +0000)]
InstCombine: Fix transform to use the swapped predicate.
Thanks Frits!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128628
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 31 Mar 2011 10:12:22 +0000 (10:12 +0000)]
InstCombine: fold fcmp (fneg x), (fneg y) -> fcmp x, y
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128627
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 31 Mar 2011 10:12:15 +0000 (10:12 +0000)]
InstCombine: fold fcmp pred (fneg x), C -> fcmp swap(pred) x, -C
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128626
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 31 Mar 2011 10:12:07 +0000 (10:12 +0000)]
InstCombine: Shrink "fcmp (fpext x), C" to "fcmp x, C" if C can be losslessly converted to the type of x.
Fixes PR9592.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128625
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 31 Mar 2011 10:11:58 +0000 (10:11 +0000)]
InstCombine: fold fcmp (fpext x), (fpext y) -> fcmp x, y.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128624
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 31 Mar 2011 10:03:32 +0000 (10:03 +0000)]
Will not compile without the spec!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128623
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 31 Mar 2011 09:58:51 +0000 (09:58 +0000)]
Strip trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128622
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 31 Mar 2011 08:13:57 +0000 (08:13 +0000)]
Testcase for r128619 (PR9571).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128620
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 31 Mar 2011 03:54:44 +0000 (03:54 +0000)]
Pick a conservative register class when creating a small live range for remat.
The rematerialized instruction may require a more constrained register class
than the register being spilled. In the test case, the spilled register has been
inflated to the DPR register class, but we are rematerializing a load of the
ssub_0 sub-register which only exists for DPR_VFP2 registers.
The register class is reinflated after spilling, so the conservative choice is
only temporary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128610
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Thu, 31 Mar 2011 00:39:16 +0000 (00:39 +0000)]
Revert "- Implement asm parsing support for LDRT, LDRBT, STRT, STRBT and"
This revision introduced a dependency cycle, as nlewycky mentioned by email.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128597
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 31 Mar 2011 00:23:57 +0000 (00:23 +0000)]
Fix typo in generated HTML.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128594
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 31 Mar 2011 00:09:35 +0000 (00:09 +0000)]
Use intrinsics for Neon vmull operations. Radar
9208957.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128591
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 30 Mar 2011 23:45:29 +0000 (23:45 +0000)]
Somehow we managed to forget to encode the lane index for a large swathe of NEON instructions. With this fix, the entire test-suite passes with the Thumb integrated assembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128587
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 30 Mar 2011 23:44:13 +0000 (23:44 +0000)]
Don't try to create zero-sized stack objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128586
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Wed, 30 Mar 2011 23:32:32 +0000 (23:32 +0000)]
- Implement asm parsing support for LDRT, LDRBT, STRT, STRBT and
{STR,LDC}{2}_PRE.
- Fixed the encoding in some places.
- Some of those instructions were using am2offset and now use addrmode2.
Codegen isn't affected, instructions which use SelectAddrMode2Offset were not
touched.
- Teach printAddrMode2Operand to check by the addressing mode which index
mode to print.
- This is a work in progress, more work to come. The idea is to change places
which use am2offset to use addrmode2 instead, as to unify assembly parser.
- Add testcases for assembly parser
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128585
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Wed, 30 Mar 2011 23:01:21 +0000 (23:01 +0000)]
Add a ARM-specific SD node for VBSL so that forms with a constant first operand
can be recognized. This fixes <rdar://problem/
9183078>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128584
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 30 Mar 2011 22:38:13 +0000 (22:38 +0000)]
Tidy up. Whitespace and 80-columns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128583
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 30 Mar 2011 21:37:19 +0000 (21:37 +0000)]
* The DSE code that tested for overlapping needed to take into account the fact
that one of the numbers is signed while the other is unsigned. This could lead
to a wrong result when the signed was promoted to an unsigned int.
* Add the data layout line to the testcase so that it will test the appropriate
thing.
Patch by David Terei!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128577
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 30 Mar 2011 21:15:35 +0000 (21:15 +0000)]
fixed typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128574
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 30 Mar 2011 18:32:53 +0000 (18:32 +0000)]
Don't add the same analysis implementation pair twice.
Prevent infinite growth of the list.
Patch by José Fonseca!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128568
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 30 Mar 2011 18:32:51 +0000 (18:32 +0000)]
Reset StringMap's NumTombstones on clears and rehashes.
StringMap was not properly updating NumTombstones after a clear or rehash.
This was not fatal until now because the table was growing faster than
NumTombstones could, but with the previous change of preventing infinite
growth of the table the invariant (NumItems + NumTombstones <= NumBuckets)
stopped being observed, causing infinite loops in certain situations.
Patch by José Fonseca!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128567
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 30 Mar 2011 18:32:48 +0000 (18:32 +0000)]
Prevent infinite growth of SmallPtrSet instances.
Rehash but don't grow when full of tombstones.
Patch by José Fonseca!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128566
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 30 Mar 2011 18:32:44 +0000 (18:32 +0000)]
Prevent infinite growth of SmallMap instances.
Rehash but don't grow when full of tombstones.
Patch by José Fonseca!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128565
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 30 Mar 2011 18:32:41 +0000 (18:32 +0000)]
Prevent infinite growth of the DenseMap.
When the hash function uses object pointers all free entries eventually
become tombstones as they are used at least once, regardless of the size.
DenseMap cannot function with zero empty keys, so it double size to get
get ridof the tombstones.
However DenseMap never shrinks automatically unless it is cleared, so
the net result is that certain tables grow infinitely.
The solution is to make a fresh copy of the table without tombstones
instead of doubling size, by simply calling grow with the current size.
Patch by José Fonseca!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128564
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 30 Mar 2011 18:14:07 +0000 (18:14 +0000)]
Fix evil VirtRegRewriter bug.
The rewriter can keep track of multiple stack slots in the same register if they
happen to have the same value. When an instruction modifies a stack slot by
defining a register that is mapped to a stack slot, other stack slots in that
register are no longer valid.
This is a very rare problem, and I don't have a simple test case. I get the
impression that VirtRegRewriter knows it is about to be deleted, inventing a
last opaque problem.
<rdar://problem/
9204040>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128562
91177308-0d34-0410-b5e6-
96231b3b80d8