summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Use standard promotion for i8 CTTZ nodes and i8 CTLZ nodes when theChandler Carruth2011-12-244-23/+19
| | | | | | | | | | | | | | | | | | LZCNT instructions are available. Force promotion to i32 to get a smaller encoding since the fix-ups necessary are just as complex for either promoted type We can't do standard promotion for CTLZ when lowering through BSR because it results in poor code surrounding the 'xor' at the end of this instruction. Essentially, if we promote the entire CTLZ node to i32, we end up doing the xor on a 32-bit CTLZ implementation, and then subtracting appropriately to get back to an i8 value. Instead, our custom logic just uses the knowledge of the incoming size to compute a perfect xor. I'd love to know of a way to fix this, but so far I'm drawing a blank. I suspect the legalizer could be more clever and/or it could collude with the DAG combiner, but how... ;] llvm-svn: 147251
* Add systematic testing for cttz as well, and fix the bug I spotted byChandler Carruth2011-12-242-1/+32
| | | | | | inspection earlier. llvm-svn: 147250
* Add i8 and i64 testing for ctlz on x86. Also simplify the i16 test.Chandler Carruth2011-12-241-4/+26
| | | | llvm-svn: 147249
* Tidy up this rather crufty test. Put the declarations at the top to makeChandler Carruth2011-12-241-33/+32
| | | | | | | | | | | | | my C-brain happy. Remove the unnecessary bits of pedantic IR fluff like nounwind. Remove stray uses comments. Name things semantically rather than tN so that adding a new test in the middle doesn't cause pain, and so that new tests can be grouped semantically. This exposes how little systematic testing is going on here. I noticed this by finding several bugs via inspection and wondering why this test wasn't catching any of them. =[ llvm-svn: 147248
* Chandler fixed this.Benjamin Kramer2011-12-241-32/+0
| | | | llvm-svn: 147247
* Expand more when we have a nice 'tzcnt' instruction, to avoid generatingChandler Carruth2011-12-242-0/+32
| | | | | | | | | | | 'bsf' instructions here. This one is actually debatable to my eyes. It's not clear that any chip implementing 'tzcnt' would have a slow 'bsf' for any reason, and unless EFLAGS or a zero input matters, 'tzcnt' is just a longer encoding. Still, this restores the old behavior with 'tzcnt' enabled for now. llvm-svn: 147246
* Tidy up some of these tests.Chandler Carruth2011-12-241-22/+19
| | | | llvm-svn: 147245
* Switch the lowering of CTLZ_ZERO_UNDEF from a .td pattern back to theChandler Carruth2011-12-245-12/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | X86ISelLowering C++ code. Because this is lowered via an xor wrapped around a bsr, we want the dagcombine which runs after isel lowering to have a chance to clean things up. In particular, it is very common to see code which looks like: (sizeof(x)*8 - 1) ^ __builtin_clz(x) Which is trying to compute the most significant bit of 'x'. That's actually the value computed directly by the 'bsr' instruction, but if we match it too late, we'll get completely redundant xor instructions. The more naive code for the above (subtracting rather than using an xor) still isn't handled correctly due to the dagcombine getting confused. Also, while here fix an issue spotted by inspection: we should have been expanding the zero-undef variants to the normal variants when there is an 'lzcnt' instruction. Do so, and test for this. We don't want to generate unnecessary 'bsr' instructions. These two changes fix some regressions in encoding and decoding benchmarks. However, there is still a *lot* to be improve on in this type of code. llvm-svn: 147244
* Cleanup this test a bit, sorting things and grouping them more clearly.Chandler Carruth2011-12-241-21/+17
| | | | llvm-svn: 147243
* Add AVX2 permute intrinsics. Also add parentheses on some macro arguments in ↵Craig Topper2011-12-242-1/+79
| | | | | | other intrinsic headers. llvm-svn: 147242
* Add AVX2 permute intrinsics. Also add parentheses on some macro arguments in ↵Craig Topper2011-12-243-21/+95
| | | | | | other intrinsic headers. llvm-svn: 147241
* Add AVX2 intrinsics for FP vbroadcast, vbroadcasti128, and vpblendd.Craig Topper2011-12-242-0/+42
| | | | llvm-svn: 147240
* Add AVX2 intrinsics for FP vbroadcast, vbroadcasti128, and vpblendd.Craig Topper2011-12-241-0/+40
| | | | llvm-svn: 147239
* Fix Comments.Jakob Stoklund Olesen2011-12-241-3/+3
| | | | llvm-svn: 147238
* Intrinsics for AVX2 unpack instructions.Craig Topper2011-12-242-0/+88
| | | | llvm-svn: 147237
* More AVX2 intrinsics for shift, psign, some shuffles, and psadbw.Craig Topper2011-12-243-82/+400
| | | | llvm-svn: 147236
* Add MachineMemOperands to instructions generated in storeRegToStackSlot orAkira Hatanaka2011-12-241-2/+16
| | | | | | loadRegFromStackSlot. llvm-svn: 147235
* Detect unaligned loads/stores that have been added for Mips64 support.Akira Hatanaka2011-12-241-1/+8
| | | | llvm-svn: 147234
* Test case for r147232.Akira Hatanaka2011-12-241-0/+12
| | | | llvm-svn: 147233
* If target ABI is N64, LEA should be daddiu.Akira Hatanaka2011-12-241-1/+1
| | | | llvm-svn: 147232
* Move x86 specific bits of the COFF writer to lib/Target/X86.Rafael Espindola2011-12-247-42/+127
| | | | llvm-svn: 147231
* Define trivial destructor inline.Rafael Espindola2011-12-242-4/+1
| | | | llvm-svn: 147230
* Make GetRelocType pure virtual.Rafael Espindola2011-12-242-9/+1
| | | | llvm-svn: 147229
* Fix typo "infinte".Nick Lewycky2011-12-231-1/+2
| | | | llvm-svn: 147226
* Fix several issues related to specializations and explicit instantiations.Nico Weber2011-12-233-5/+155
| | | | | | | | | | | | | | | Explicit instantiations following specializations are no-ops and hence have no PointOfInstantiation. That was done correctly in most cases, but for a specialization -> instantiation decl -> instantiation definition chain, the definition didn't realize that it was a no-op. Fix that. Also, when printing diagnostics for these no-ops, get the diag location from the decl name location. Add many test cases, one of them not yet passing (but it failed the same way before this change). Fixes http://llvm.org/pr11558 and more. llvm-svn: 147225
* fix for PR11634Anton Yartsev2011-12-232-0/+2
| | | | llvm-svn: 147224
* Move this test from date-name to feature-name, and port it to FileCheck.Nick Lewycky2011-12-231-2/+14
| | | | llvm-svn: 147223
* Give C11's __STDC_VERSION__ the final value.Benjamin Kramer2011-12-231-4/+1
| | | | llvm-svn: 147222
* Mass rename C1x references to C11. The name hasn't proliferated like "C++0x" ↵Benjamin Kramer2011-12-2322-76/+76
| | | | | | | | so this patch is surprisingly small. Also drop -Wc1x-extensions in favor of -Wc11-extensions. I don't think we need to keep this around for compatibility. llvm-svn: 147221
* C1X is now C11, add -std=c11 and -std=gnu11 as aliases for the c1x arguments.Benjamin Kramer2011-12-231-4/+13
| | | | llvm-svn: 147220
* Add AVX2 multiply intrinsics.Craig Topper2011-12-233-0/+82
| | | | llvm-svn: 147219
* Let CompilerInvocation initialization indicate failureDylan Noblesmith2011-12-236-52/+104
| | | | | | | | | This fixes the FIXMEs in ParseAnalyzeArgs. (Also a precursor to moving the analyzer into an AST plugin.) For consistency, do the same with AssemblerInvocation. llvm-svn: 147218
* When not destroying the source, the linker is not remapping the types. Added ↵Mon P Wang2011-12-233-6/+9
| | | | | | | | support to CloneFunctionInto to allow remapping for this case. llvm-svn: 147217
* Pass context and access to Parser::ParseExplicitInstantiation() forArgyrios Kyrtzidis2011-12-234-10/+24
| | | | | | | | good parser error recovery and for not crashing. We still have a accepts-invalid-code bug. llvm-svn: 147216
* Use 'check_symbol_exists' instead of 'check_function_exists' for finding ↵Ted Kremenek2011-12-231-1/+1
| | | | | | isatty. This change allows Xcode generated projects to have HAVE_ISATTY to be properly defined. llvm-svn: 147215
* Sanity check the data I am going to read from the extractor to avoid asserting.Jim Ingham2011-12-231-0/+6
| | | | llvm-svn: 147214
* rdar://problem/10216227Johnny Chen2011-12-232-1/+9
| | | | | | | | | LLDB (python bindings) Crashing in lldb::SBDebugger::DeleteTarget(lldb::SBTarget&) Need to check the validity of (SBTarget&)target passed to SBDebugger::DeleteTarget() before calling target->Destroy(). llvm-svn: 147213
* Added a bunch more structure return tests.Jim Ingham2011-12-232-45/+399
| | | | llvm-svn: 147212
* Experimental support for aligned NEON spills.Jakob Stoklund Olesen2011-12-234-13/+450
| | | | | | | | | | | | | ARM targets with NEON units have access to aligned vector loads and stores that are potentially faster than unaligned operations. Add support for spilling the callee-saved NEON registers to an aligned stack area using 16-byte aligned NEON loads and store. This feature is off by default, controlled by an -align-neon-spills command line option. llvm-svn: 147211
* objective-c: Use class definition AST in several situations whenFariborz Jahanian2011-12-233-1/+20
| | | | | | | building related objc ASTs which require a class definition AST. These were uncovered when testing objc rewriter. llvm-svn: 147210
* Fixed a thinko when returning a struct like {short a; short b; short c; ↵Jim Ingham2011-12-231-1/+1
| | | | | | float d}. llvm-svn: 147209
* Remove spurious, but now legal, typenameDouglas Gregor2011-12-231-1/+1
| | | | llvm-svn: 147208
* When building a module with an umbrella header, warn about any headersDouglas Gregor2011-12-234-3/+76
| | | | | | | | found within that umbrella directory that were not actually included by the umbrella header. They should either be referenced in the module map or included by the umbrella header. llvm-svn: 147207
* Add variants of the dispatchsetup pseudo for Thumb and !VFP. <rdar://10620138>Bob Wilson2011-12-224-7/+23
| | | | | | | | | | | My change r146949 added register clobbers to the eh_sjlj_dispatchsetup pseudo instruction, but on Thumb1 some of those registers cannot be used. This caused massive failures on the testsuite when compiling for Thumb1. While fixing that, I noticed that the eh_sjlj_setjmp instruction has a "nofp" variant, and I realized that dispatchsetup needs the same thing, so I have added that as well. llvm-svn: 147204
* Colorize and condense CFG pretty-printing.Ted Kremenek2011-12-229-1523/+1499
| | | | llvm-svn: 147203
* Add -Wdangling-else.Nico Weber2011-12-225-25/+101
| | | | | | | This works like described in http://drdobbs.com/blogs/cpp/231602010 Fixes http://llvm.org/PR11609 llvm-svn: 147202
* TableGen: add a commentDylan Noblesmith2011-12-221-1/+1
| | | | llvm-svn: 147199
* try to fix MSVC buildDylan Noblesmith2011-12-221-0/+3
| | | | llvm-svn: 147198
* drop unneeded config.h includesDylan Noblesmith2011-12-2211-11/+2
| | | | llvm-svn: 147197
* Attempt #2 to fix mingw crossbuild. This time with more ugly hacks!Benjamin Kramer2011-12-222-4/+4
| | | | llvm-svn: 147196
OpenPOWER on IntegriCloud