Commit Graph

2606 Commits

Author SHA1 Message Date
David Greene
a20244d1ba [AVX] Fix mask predicates for 256-bit UNPCKLPS/D and implement
missing patterns for them.

      Add a SIMD test subdirectory to hold tests for SIMD instruction
      selection correctness and quality.
'


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126845 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-02 17:23:43 +00:00
Cameron Zwarich
56e3793acf Eliminate the unused CodeGenPrepare option to split critical edges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126825 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-02 03:31:46 +00:00
Dan Gohman
0cbe91ba3b Don't re-use existing addrec expansions if they contain casts.
This fixes PR9259.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126812 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-02 01:34:10 +00:00
Evan Cheng
f06e6c2ba7 Catch more cases where 2-address pass should 3-addressify instructions. rdar://9002648.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126811 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-02 01:08:17 +00:00
Duncan Sands
377ffe3b11 Windows codegen also dies on this, so restrict to the platform it was
actually tested on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126652 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-28 14:22:08 +00:00
Duncan Sands
443612e165 Make this test x86 specific because the ARM backend can't handle it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126650 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-28 12:30:47 +00:00
NAKAMURA Takumi
419f232783 Target/X86: Always emit "push/pop GPRs" in prologue/epilogue and emit "spill/reload frames" for XMMs.
It improves Win64's prologue/epilogue but it would not affect ia32 and amd64 (lack of nonvolatile XMMs).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126568 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-27 08:47:19 +00:00
Cameron Zwarich
eee444cc4e Fix PR9324 / <rdar://problem/9052489> by handling the case where a PHI has no uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126567 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-27 08:06:01 +00:00
Cameron Zwarich
60c8b22dad Give a test file a more sensible name so that it can hold more test cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126566 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-27 08:05:57 +00:00
Benjamin Kramer
7466678003 Add some DAGCombines for (adde 0, 0, glue), which are useful to optimize legalized code for large integer arithmetic.
1. Inform users of ADDEs with two 0 operands that it never sets carry
2. Fold other ADDs or ADDCs into the ADDE if possible

It would be neat if we could do the same thing for SETCC+ADD eventually, but we can't do that in target independent code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126557 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-26 22:48:07 +00:00
Nadav Rotem
8c20ec54d9 Enable support for vector sext and trunc:
Limit the folding of any_ext and sext  into the load operation to scalars.
Limit the active-bits trunc optimization to scalars.
Document vector trunc and vector sext in LangRef.

Similar to commit 126080 (for enabling zext).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126424 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-24 21:01:34 +00:00
Devang Patel
3fe3424a21 Move arch specific tests in arch specific directories.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126401 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-24 19:06:27 +00:00
Cameron Zwarich
8ca814c4e0 Merge information about the number of zero, one, and sign bits of live-out
registers at phis. This enables us to eliminate a lot of pointless zexts during
the DAGCombine phase. This fixes <rdar://problem/8760114>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126380 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-24 10:00:25 +00:00
Evan Cheng
7558e2e415 Fix bug in X86 folding / unfolding table. Int_CMPSDrm and Int_CMPSSrm memory
operands starts at index 2, not 1.
rdar://9045024
PR9305


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126359 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-24 02:36:52 +00:00
Devang Patel
3a4ae32ed7 Use DW_FORM_data2 for DW_AT_language and let users use DW_LANG_lo_user=0x8000 to DW_LANG_hi_user=0xffff range.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126339 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-23 22:37:04 +00:00
Devang Patel
1d6b2c74c0 Check only relevant strings in output to increase stability of the tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126338 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-23 22:35:57 +00:00
NAKAMURA Takumi
6023efb45d Revert r126195, "test/CodeGen/X86/vec_cast.ll: Mark as XFAIL: migw,win32 for workaround of PR8311."
It seems it affected configuration --target=i686-pc-mingw32, I don't know and will investigate why.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126217 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 08:22:54 +00:00
NAKAMURA Takumi
0de102b9d8 Relax expressions and add explicit triplets -linux and -win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126216 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 07:21:59 +00:00
NAKAMURA Takumi
65e9404646 Relax expressions and add explicit triplets -linux and -win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126215 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 07:21:51 +00:00
NAKAMURA Takumi
3f38d20f95 Relax expressions and add explicit triplets -linux and -win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126214 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 07:21:42 +00:00
NAKAMURA Takumi
aef8871177 Relax expressions and add explicit triplets -linux and -win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126213 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 07:21:33 +00:00
NAKAMURA Takumi
88234f14a8 Relax expressions and add explicit triplets -linux and -win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126212 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 07:21:25 +00:00
NAKAMURA Takumi
902f128141 Relax expressions and add explicit triplets -linux and -win32.
On @foobar(double %d, double* %x),
AMD64: (%xmm0, %rdi)
Win64: (%xmm0, %rdx) (not %rcx!)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126211 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 07:21:17 +00:00
NAKAMURA Takumi
166b79fb24 Relax expressions and add explicit triplets -linux and -win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126210 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 07:21:08 +00:00
NAKAMURA Takumi
661cae4b58 Relax expressions and add explicit triplets -linux and -win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126209 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 07:21:01 +00:00
NAKAMURA Takumi
db2649995d Relax expressions and add explicit triplets -linux and -win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126208 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 07:20:52 +00:00
NAKAMURA Takumi
20cee65fd1 Relax expressions and add explicit triplets -linux and -win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126207 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 07:20:44 +00:00
NAKAMURA Takumi
5731b5c8ce Relax expressions and add explicit triplets -linux and -win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126206 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 07:20:35 +00:00
NAKAMURA Takumi
22bc92baa4 Relax expressions and add explicit triplets -linux and -win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126205 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 07:20:26 +00:00
NAKAMURA Takumi
ed2ac7c211 Relax expressions and add explicit triplets -linux and -win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126204 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 07:20:18 +00:00
NAKAMURA Takumi
62627126fe Relax expressions and add explicit triplets -linux and -win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126203 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 07:20:10 +00:00
NAKAMURA Takumi
64779f4b87 Relax expressions and add explicit triplets -linux and -win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126202 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 07:20:02 +00:00
NAKAMURA Takumi
9839eb06bd Relax expressions and add explicit triplets -linux and -win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126201 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 07:19:54 +00:00
NAKAMURA Takumi
e51a69c8fd Relax expressions and add explicit triplets -linux and -win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126200 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 07:19:46 +00:00
NAKAMURA Takumi
c3bf772620 Relax expressions and add explicit triplets -linux and -win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126199 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 07:19:37 +00:00
NAKAMURA Takumi
39109a3ce9 Relax expressions and add explicit triplets -linux and -win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126198 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 07:19:28 +00:00
NAKAMURA Takumi
007b2b3c7e Relax expressions and add explicit triplets -linux and -win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126197 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 07:19:20 +00:00
NAKAMURA Takumi
52ae4cac4e Relax expressions and add explicit triplets -linux and -win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126196 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 07:19:12 +00:00
NAKAMURA Takumi
ba2218ac24 test/CodeGen/X86/vec_cast.ll: Mark as XFAIL: migw,win32 for workaround of PR8311.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126195 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 07:19:03 +00:00
NAKAMURA Takumi
135c03094f test/CodeGen/X86/red-zone.ll: Add explicit -mtriple=x86_64-linux.
Redzone is not applicable on Win64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126194 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 07:18:55 +00:00
Andrew Trick
fcfcdbc86a VirtRegRewriter assertion fix.
Apparently it's ok for multiple operands to "kill" the same register.
Fixes PR9237.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126190 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 06:52:56 +00:00
Cameron Zwarich
4ecc82e592 Roll out r126169 and r126170 in an attempt to fix the selfhost bot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126185 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 03:24:52 +00:00
Cameron Zwarich
92efda7e91 Merge information about the number of zero, one, and sign bits of live-out registers
at phis. This enables us to eliminate a lot of pointless zexts during the DAGCombine
phase. This fixes <rdar://problem/8760114>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126170 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 00:46:27 +00:00
Eric Christopher
f8597eb0d9 Revert r125960, it's breaking darwin10 bootstrap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126163 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-21 23:52:19 +00:00
Devang Patel
68e6beeccc Revert r124611 - "Keep track of incoming argument's location while emitting LiveIns."
In other words, do not keep track of argument's location.  The debugger (gdb) is not prepared to see line table entries for arguments. For the debugger, "second" line table entry marks beginning of function body.
This requires some coordination with debugger to get this working. 
 - The debugger needs to be aware of prolog_end attribute attached with line table entries.
 - The compiler needs to accurately mark prolog_end in line table entries (at -O0 and at -O1+)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126155 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-21 23:21:26 +00:00
NAKAMURA Takumi
d64cfe1506 Target/X86/X86FastISel: [PR6275] Fix Win32's dllimport function with fastisel.
"dllimport" function must not be GlobalVariable, but Function. It is enough to check with GlobalValue.
test/CodeGen/X86/dll-linkage.ll is updated to check llc -O0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126110 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-21 04:50:06 +00:00
Cameron Zwarich
8d7285d0e5 The signed version of our "magic number" computation for the integer approximation
of a constant had a minor typo introduced when copying it from the book, which
caused it to favor negative approximations over positive approximations in many
cases. Positive approximations require fewer operations beyond the multiplication.

In the case of division by 3, we still generate code that is a single instruction
larger than GCC's code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126097 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-21 00:22:02 +00:00
Nick Lewycky
eff5e69c82 Make RecursivelyDeleteDeadPHINode delete a phi node that has no users and add a
test for that. With this change, test/CodeGen/X86/codegen-dce.ll no longer finds
any instructions to DCE, so delete the test.

Also renamed J and JP to I and IP in RecursivelyDeleteDeadPHINode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126088 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-20 18:05:56 +00:00
Nadav Rotem
ed9b934f65 Fix 9267; Add vector zext support.
The DAGCombiner folds the zext into complex load instructions. This patch
prevents this optimization on vectors since none of the supported targets
knows how to perform load+vector_zext in one instruction.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126080 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-20 12:37:50 +00:00
Devang Patel
fe19e3f74c DIE numbers do not add any value in this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126008 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-19 01:28:37 +00:00