- Dec 28, 2011
-
-
Nadav Rotem authored
Promotion of the mask operand needs to be done using PromoteTargetBoolean, and not padded with garbage. llvm-svn: 147309
-
Elena Demikhovsky authored
Matching MOVLP mask for AVX (265-bit vectors) was wrong. The failure was detected by conformance tests. llvm-svn: 147308
-
Nick Lewycky authored
llvm-svn: 147307
-
- Dec 27, 2011
-
-
Rafael Espindola authored
llvm-svn: 147296
-
Benjamin Kramer authored
- -25% memory usage of the main table on x86_64 (was wasted in struct padding). - no significant performance change. llvm-svn: 147294
-
Nick Lewycky authored
llvm-svn: 147292
-
Nick Lewycky authored
llvm-svn: 147291
-
Benjamin Kramer authored
llvm-svn: 147289
-
Craig Topper authored
Add handling of x86_avx2_pmovmskb to computeMaskedBitsForTargetNode for consistency. Add comments and an assert for BMI instructions to PerformXorCombine since the enabling of the combine is conditional on it, but the function itself isn't. llvm-svn: 147287
-
Nick Lewycky authored
to discard weights when appropriate. Still more to do (and a new TODO), but it's a start! llvm-svn: 147286
-
Nick Lewycky authored
there is non of that type to remove. This fixes a crasher in the particular case where the instruction has metadata but no metadata storage in the context (this is only possible if the instruction has !dbg but no other metadata info). llvm-svn: 147285
-
Rafael Espindola authored
llvm-svn: 147284
-
- Dec 26, 2011
-
-
Eli Friedman authored
Make sure DAGCombiner doesn't introduce multiple loads from the same memory location. PR10747, part 2. llvm-svn: 147283
-
Nick Lewycky authored
llvm-svn: 147280
-
Nick Lewycky authored
llvm-svn: 147279
-
- Dec 25, 2011
-
-
Nadav Rotem authored
llvm-svn: 147274
-
Nadav Rotem authored
llvm-svn: 147272
-
Venkatraman Govindaraju authored
llvm-svn: 147269
-
Bill Wendling authored
llvm-svn: 147264
-
Rafael Espindola authored
llvm-svn: 147261
-
- Dec 24, 2011
-
-
Chandler Carruth authored
This is a result of Benjamin's work on ValueTracking. llvm-svn: 147259
-
Benjamin Kramer authored
InstCombine: Add a combine that turns (2^n)-1 ^ x back into (2^n)-1 - x iff x is smaller than 2^n and it fuses with a following add. This was intended to undo the sub canonicalization in cases where it's not profitable, but it also finds some cases on it's own. llvm-svn: 147256
-
Benjamin Kramer authored
unsigned foo(unsigned x) { return 31 - __builtin_clz(x); } now compiles into a single "bsrl" instruction on x86. llvm-svn: 147255
-
Benjamin Kramer authored
This has the obvious advantage of being commutable and is always a win on x86 because const - x wastes a register there. On less weird architectures this may lead to a regression because other arithmetic doesn't fuse with it anymore. I'll address that problem in a followup. llvm-svn: 147254
-
Rafael Espindola authored
x86 specific reloc_coff_secrel32 with a generic FK_SecRel_4. llvm-svn: 147252
-
Chandler Carruth authored
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
-
Chandler Carruth authored
inspection earlier. llvm-svn: 147250
-
Chandler Carruth authored
llvm-svn: 147249
-
Chandler Carruth authored
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
-
Benjamin Kramer authored
llvm-svn: 147247
-
Chandler Carruth authored
'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
-
Chandler Carruth authored
llvm-svn: 147245
-
Chandler Carruth authored
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
-
Chandler Carruth authored
llvm-svn: 147243
-
Jakob Stoklund Olesen authored
llvm-svn: 147238
-
Akira Hatanaka authored
loadRegFromStackSlot. llvm-svn: 147235
-
Akira Hatanaka authored
llvm-svn: 147234
-
Akira Hatanaka authored
llvm-svn: 147233
-
Akira Hatanaka authored
llvm-svn: 147232
-
Rafael Espindola authored
llvm-svn: 147231
-