7ee3ca10f53aacce1f3aa052f81f9598ac09db33 |
|
22-Jun-2012 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Revert remaining part of r93200: "Disable folding sext(trunc(x)) -> x" This fixes PR5997. These transforms were disabled because codegen couldn't deal with other uses of trunc(x). This is now handled by the peephole pass. This causes no regressions on x86-64. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159003 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
b47f3ea22461b2d877d4a3246d54bdeab4fcfaa3 |
|
20-Jun-2012 |
Nuno Lopes <nunoplopes@sapo.pt> |
replace usage of EmitGEPOffset() with TargetData::getIndexedOffset() when the GEP offset is known to be constant. With this change, we avoid relying on the IR Builder to constant fold the operations. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158829 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
3f71cf14b224d8c4f5634296ab785e227ba3c03c |
|
05-May-2012 |
Stepan Dyatkovskiy <stpworld@narod.ru> |
Small fix in InstCombineCasts.cpp. Restored "alloca + bitcast" reducing for case when alloca's size is calculated within the "add/sub/... nsw". Also added fix to 2011-06-13-nsw-alloca.ll test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156231 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
26c8dcc692fb2addd475446cfff24d6a4e958bca |
|
04-Apr-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Always compute all the bits in ComputeMaskedBits. This allows us to keep passing reduced masks to SimplifyDemandedBits, but know about all the bits if SimplifyDemandedBits fails. This allows instcombine to simplify cases like the one in the included testcase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154011 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
7302d80490feabfc8a01bee0fa698aab55169544 |
|
06-Feb-2012 |
Chris Lattner <sabre@nondot.org> |
Remove some dead code and tidy things up now that vectors use ConstantDataVector instead of always using ConstantVector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149912 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
4d6ccb5f68cd7c6418a209f1fa4dbade569e4493 |
|
20-Jan-2012 |
David Blaikie <dblaikie@gmail.com> |
More dead code removal (using -Wunreachable-code) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148578 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
ce16339930a2b03e53b4e6399ef59c092a7f2cfa |
|
17-Dec-2011 |
Dan Gohman <gohman@apple.com> |
The powers that be have decided that LLVM IR should now support 16-bit "half precision" floating-point with a first-class type. This patch adds basic IR support (but not codegen support). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146786 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
00737bdb488cc7157ca5f7a40d6cd8467ad09a79 |
|
01-Dec-2011 |
Chad Rosier <mcrosier@apple.com> |
Last bit of TargetLibraryInfo propagation. Also fixed a case for TargetData where it appeared beneficial to pass. More of rdar://10500969 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145630 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
caebb1e00b28226597b53371751391c50aa0283b |
|
30-Nov-2011 |
Chad Rosier <mcrosier@apple.com> |
Whitespace. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145470 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
3d925d24e8c54cde05228258c25cc21687cad922 |
|
30-Nov-2011 |
Chad Rosier <mcrosier@apple.com> |
Add support for sqrt, sqrtl, and sqrtf in TargetLibraryInfo. Disable (fptrunc (sqrt (fpext x))) -> (sqrtf x) transformation if -fno-builtin is specified. rdar://10466410 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
a9390a4d5f5d568059a80970d22194b165d097a7 |
|
27-Sep-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Stop emitting instructions with the name "tmp" they eat up memory and have to be uniqued, without any benefit. If someone prefers %tmp42 to %42, run instnamer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
89879ec76b5d81b0cc82e9f402dfe7c4cc63b0d6 |
|
29-Aug-2011 |
Nadav Rotem <nadav.rotem@intel.com> |
Fixes following the CR by Chris and Duncan: Optimize chained bitcasts of the form A->B->A. Undo r138722 and change isEliminableCastPair to allow this case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138756 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
be6ceb6ebcfb48e09ffab297c1537c87383f0ce9 |
|
28-Aug-2011 |
Nadav Rotem <nadav.rotem@intel.com> |
Bitcasts are transitive. Bitcast-Bitcast-X becomes Bitcast-X. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
a9203109f4ac95aa7e9624f2838e3d89623ec902 |
|
25-Jul-2011 |
Jay Foad <jay.foad@gmail.com> |
Convert GetElementPtrInst to use ArrayRef. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
0a2a60ace9b79164b71794ce7ff981171c61e442 |
|
22-Jul-2011 |
Jay Foad <jay.foad@gmail.com> |
Convert IRBuilder::CreateGEP and IRBuilder::CreateInBoundsGEP to use ArrayRef. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135761 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
747032522f9f3b2d9bae71aa303c1a0fd953eee9 |
|
20-Jul-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Clean up includes of llvm/Analysis/ConstantFolding.h so it's included where it's used and not included where it isn't. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135628 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
db125cfaf57cc83e7dd7453de2d509bc8efd0e5e |
|
18-Jul-2011 |
Chris Lattner <sabre@nondot.org> |
land David Blaikie's patch to de-constify Type, with a few tweaks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
93a635c82c33e331bd4c5f4f44ba1e37a08bd687 |
|
13-Jul-2011 |
Evan Cheng <evan.cheng@apple.com> |
It's not safe to fold (fptrunc (sqrt (fpext x))) to (sqrtf x) if there is another use of sqrt. rdar://9763193 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135058 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
e2e86f6bca1c34490e97edf5ab2bb36e9bd4f799 |
|
09-Jul-2011 |
Bob Wilson <bob.wilson@apple.com> |
Reapply a fixed version of r133285. This tightens up checking for overflow in alloca sizes, based on feedback from Duncan and John about the change in r132926. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134749 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
66638b2333f326afd1b3cf35d6fc9b930d276511 |
|
18-Jun-2011 |
Chad Rosier <mcrosier@apple.com> |
Revert r133285. Causing odd failures on Dragonegg. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133301 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
3761c34e03a1220f0cc2ee7df31feeec5ee7e15c |
|
17-Jun-2011 |
Stuart Hastings <stuart@apple.com> |
Relocate NUW test to cover all binary ops in a dynamic alloca expr. Followup to 132926. rdar://problem/9265821 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133285 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
7ac8f8f3418c9ee7cb3f27aa9e5033e9b73ef84f |
|
13-Jun-2011 |
Stuart Hastings <stuart@apple.com> |
Avoid fusing bitcasts with dynamic allocas if the amount-to-allocate might overflow. Re-typing the alloca to a larger type (e.g. double) hoists a shift into the alloca, potentially exposing overflow in the expression. rdar://problem/9265821 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132926 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
a311c34d2af7c750f016ef5e4c41bee77a1dfac7 |
|
27-May-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Final step of instcombine debuginfo; switch a couple more places over to InsertNewInstWith, and use setDebugLoc for the cases which can't be easily handled by the automated mechanisms. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132167 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
107ffd58f70651cc928416f6aaf267accc992c23 |
|
19-May-2011 |
Eli Friedman <eli.friedman@gmail.com> |
More instcombine simplifications towards better debug locations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131596 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
3e22cb9ec30cd9b1be9b0f50e400f512124997e5 |
|
18-May-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Use ReplaceInstUsesWith instead of replaceAllUsesWith where appropriate in instcombine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131512 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
f5b75932b8c23db5789ad19687c98070c551e896 |
|
02-Apr-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
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
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
406a6502377638f76fec46502248aeb65f419f08 |
|
02-Apr-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Fix comment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128745 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
5337fabdc4b585acbce8489a71e997d1dd0f6e92 |
|
02-Apr-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
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
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
ce1498bdbe32d0d6ab14d449d559ee76c0b30d9d |
|
01-Apr-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Fix build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128733 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
0baa94a13bf24cf7d916b4c6c415fb84b464bfd3 |
|
01-Apr-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
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
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
0a30c42008f88c3fba64127da8d73ba2fcd16fd6 |
|
01-Apr-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
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
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
3ecfc861b4365f341c5c969b40e1afccde676e6f |
|
30-Mar-2011 |
Jay Foad <jay.foad@gmail.com> |
Remove PHINode::reserveOperandSpace(). Instead, add a parameter to PHINode::Create() giving the (known or expected) number of operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
d8b4fb4aab4d6fedb2b14bed1b846451b17bde7c |
|
30-Mar-2011 |
Jay Foad <jay.foad@gmail.com> |
(Almost) always call reserveOperandSpace() on newly created PHINodes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128535 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
5aa3fa6d827e162893534454b2a2c4b6e50884fc |
|
08-Mar-2011 |
Devang Patel <dpatel@apple.com> |
llvm.dbg.declare intrinsic does not use any llvm::Values. It's magic! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127282 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
2ca5c8644e6c35b3a7910a576ed89cddb7b82c3b |
|
15-Feb-2011 |
Chris Lattner <sabre@nondot.org> |
convert ConstantVector::get to use ArrayRef. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
75831904220042260c4faece8507a2807acba47f |
|
14-Feb-2011 |
Chris Lattner <sabre@nondot.org> |
revert my ConstantVector patch, it seems to have made the llvm-gcc builders unhappy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
283c8caccd093f8e1d4f0bdd01ac240b4edbd20a |
|
14-Feb-2011 |
Chris Lattner <sabre@nondot.org> |
Switch ConstantVector::get to use ArrayRef instead of a pointer+size idiom. Change various clients to simplify their code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125487 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
62fe406dc2ff66cea9258b7cd9a09b5005b6b0b1 |
|
15-Jan-2011 |
Chris Lattner <sabre@nondot.org> |
implement an instcombine xform that canonicalizes casts outside of and-with-constant operations. This fixes rdar://8808586 which observed that we used to compile: union xy { struct x { _Bool b[15]; } x; __attribute__((packed)) struct y { __attribute__((packed)) unsigned long b0to7; __attribute__((packed)) unsigned int b8to11; __attribute__((packed)) unsigned short b12to13; __attribute__((packed)) unsigned char b14; } y; }; struct x foo(union xy *xy) { return xy->x; } into: _foo: ## @foo movq (%rdi), %rax movabsq $1095216660480, %rcx ## imm = 0xFF00000000 andq %rax, %rcx movabsq $-72057594037927936, %rdx ## imm = 0xFF00000000000000 andq %rax, %rdx movzbl %al, %esi orq %rdx, %rsi movq %rax, %rdx andq $65280, %rdx ## imm = 0xFF00 orq %rsi, %rdx movq %rax, %rsi andq $16711680, %rsi ## imm = 0xFF0000 orq %rdx, %rsi movl %eax, %edx andl $-16777216, %edx ## imm = 0xFFFFFFFFFF000000 orq %rsi, %rdx orq %rcx, %rdx movabsq $280375465082880, %rcx ## imm = 0xFF0000000000 movq %rax, %rsi andq %rcx, %rsi orq %rdx, %rsi movabsq $71776119061217280, %r8 ## imm = 0xFF000000000000 andq %r8, %rax orq %rsi, %rax movzwl 12(%rdi), %edx movzbl 14(%rdi), %esi shlq $16, %rsi orl %edx, %esi movq %rsi, %r9 shlq $32, %r9 movl 8(%rdi), %edx orq %r9, %rdx andq %rdx, %rcx movzbl %sil, %esi shlq $32, %rsi orq %rcx, %rsi movl %edx, %ecx andl $-16777216, %ecx ## imm = 0xFFFFFFFFFF000000 orq %rsi, %rcx movq %rdx, %rsi andq $16711680, %rsi ## imm = 0xFF0000 orq %rcx, %rsi movq %rdx, %rcx andq $65280, %rcx ## imm = 0xFF00 orq %rsi, %rcx movzbl %dl, %esi orq %rcx, %rsi andq %r8, %rdx orq %rsi, %rdx ret We now compile this into: _foo: ## @foo ## BB#0: ## %entry movzwl 12(%rdi), %eax movzbl 14(%rdi), %ecx shlq $16, %rcx orl %eax, %ecx shlq $32, %rcx movl 8(%rdi), %edx orq %rcx, %rdx movq (%rdi), %rax ret A small improvement :-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123520 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
2d0537cdd8dbc8101a667d0a333fdfd342755ad1 |
|
18-Dec-2010 |
Bill Wendling <isanbard@gmail.com> |
Whitespace fixes. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122110 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
9a3dc552022e0e034ef34da889f6ceb9de260c96 |
|
18-Dec-2010 |
Nate Begeman <natebegeman@mac.com> |
Add vector versions of some existing scalar transforms to aid codegen in matching psign & pblend operations to the IR produced by clang/gcc for their C idioms. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122105 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
979ed44feb1be70e641275aaef5460320fab86a3 |
|
07-Sep-2010 |
Chris Lattner <sabre@nondot.org> |
Fix a serious performance regression introduced by r108687 on linux: turning (fptrunc (sqrt (fpext x))) -> (sqrtf x) is great, but we have to delete the original sqrt as well. Not doing so causes us to do two sqrt's when building with -fmath-errno (the default on linux). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113260 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
157d4ead36ace978a01d80a29aa1b53c832ebafb |
|
28-Aug-2010 |
Chris Lattner <sabre@nondot.org> |
for completeness, allow undef also. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112351 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
790077954384a4546fa68247744104936fd9b6cf |
|
28-Aug-2010 |
Chris Lattner <sabre@nondot.org> |
handle the constant case of vector insertion. For something like this: struct S { float A, B, C, D; }; struct S g; struct S bar() { struct S A = g; ++A.B; A.A = 42; return A; } we now generate: _bar: ## @bar ## BB#0: ## %entry movq _g@GOTPCREL(%rip), %rax movss 12(%rax), %xmm0 pshufd $16, %xmm0, %xmm0 movss 4(%rax), %xmm2 movss 8(%rax), %xmm1 pshufd $16, %xmm1, %xmm1 unpcklps %xmm0, %xmm1 addss LCPI1_0(%rip), %xmm2 pshufd $16, %xmm2, %xmm2 movss LCPI1_1(%rip), %xmm0 pshufd $16, %xmm0, %xmm0 unpcklps %xmm2, %xmm0 ret instead of: _bar: ## @bar ## BB#0: ## %entry movq _g@GOTPCREL(%rip), %rax movss 12(%rax), %xmm0 pshufd $16, %xmm0, %xmm0 movss 4(%rax), %xmm2 movss 8(%rax), %xmm1 pshufd $16, %xmm1, %xmm1 unpcklps %xmm0, %xmm1 addss LCPI1_0(%rip), %xmm2 movd %xmm2, %eax shlq $32, %rax addq $1109917696, %rax ## imm = 0x42280000 movd %rax, %xmm0 ret git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112345 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
3dd08734c1812e47ae5f6aceba15f28865f75943 |
|
28-Aug-2010 |
Chris Lattner <sabre@nondot.org> |
optimize bitcasts from large integers to vector into vector element insertion from the pieces that feed into the vector. This handles a pattern that occurs frequently due to code generated for the x86-64 abi. We now compile something like this: struct S { float A, B, C, D; }; struct S g; struct S bar() { struct S A = g; ++A.A; ++A.C; return A; } into all nice vector operations: _bar: ## @bar ## BB#0: ## %entry movq _g@GOTPCREL(%rip), %rax movss LCPI1_0(%rip), %xmm1 movss (%rax), %xmm0 addss %xmm1, %xmm0 pshufd $16, %xmm0, %xmm0 movss 4(%rax), %xmm2 movss 12(%rax), %xmm3 pshufd $16, %xmm2, %xmm2 unpcklps %xmm2, %xmm0 addss 8(%rax), %xmm1 pshufd $16, %xmm1, %xmm1 pshufd $16, %xmm3, %xmm2 unpcklps %xmm2, %xmm1 ret instead of icky integer operations: _bar: ## @bar movq _g@GOTPCREL(%rip), %rax movss LCPI1_0(%rip), %xmm1 movss (%rax), %xmm0 addss %xmm1, %xmm0 movd %xmm0, %ecx movl 4(%rax), %edx movl 12(%rax), %esi shlq $32, %rdx addq %rcx, %rdx movd %rdx, %xmm0 addss 8(%rax), %xmm1 movd %xmm1, %eax shlq $32, %rsi addq %rax, %rsi movd %rsi, %xmm1 ret This resolves rdar://8360454 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112343 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
29cc0b3660dc75df06679c4c49cf91ffe24615ff |
|
28-Aug-2010 |
Chris Lattner <sabre@nondot.org> |
Implement a pretty general logical shift propagation framework, which is good at ripping through bitfield operations. This generalize a bunch of the existing xforms that instcombine does, such as (x << c) >> c -> and to handle intermediate logical nodes. This is useful for ripping up the "promote to large integer" code produced by SRoA. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112304 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
f9d05ab007d4764a78e820aecfcf8de179d178a7 |
|
27-Aug-2010 |
Chris Lattner <sabre@nondot.org> |
teach the truncation optimization that an entire chain of computation can be truncated if it is fed by a sext/zext that doesn't have to be exactly equal to the truncation result type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112285 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
784f333aef929fbc5867ce17a165837401378c17 |
|
27-Aug-2010 |
Chris Lattner <sabre@nondot.org> |
Add an instcombine to clean up a common pattern produced by the SRoA "promote to large integer" code, eliminating some type conversions like this: %94 = zext i16 %93 to i32 ; <i32> [#uses=2] %96 = lshr i32 %94, 8 ; <i32> [#uses=1] %101 = trunc i32 %96 to i8 ; <i8> [#uses=1] This also unblocks other xforms from happening, now clang is able to compile: struct S { float A, B, C, D; }; float foo(struct S A) { return A.A + A.B+A.C+A.D; } into: _foo: ## @foo ## BB#0: ## %entry pshufd $1, %xmm0, %xmm2 addss %xmm0, %xmm2 movdqa %xmm1, %xmm3 addss %xmm2, %xmm3 pshufd $1, %xmm1, %xmm0 addss %xmm3, %xmm0 ret on x86-64, instead of: _foo: ## @foo ## BB#0: ## %entry movd %xmm0, %rax shrq $32, %rax movd %eax, %xmm2 addss %xmm0, %xmm2 movapd %xmm1, %xmm3 addss %xmm2, %xmm3 movd %xmm1, %rax shrq $32, %rax movd %eax, %xmm0 addss %xmm3, %xmm0 ret This seems pretty close to optimal to me, at least without using horizontal adds. This also triggers in lots of other code, including SPEC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112278 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
26dbe7ec18740f642febcc738e628d921aafd079 |
|
27-Aug-2010 |
Chris Lattner <sabre@nondot.org> |
optimize "integer extraction out of the middle of a vector" as produced by SRoA. This is part of rdar://7892780, but needs another xform to expose this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112232 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
e5a1426174986951a20ec6ffd119b77a24a65706 |
|
26-Aug-2010 |
Chris Lattner <sabre@nondot.org> |
optimize bitcast(trunc(bitcast(x))) where the result is a float and 'x' is a vector to be a vector element extraction. This allows clang to compile: struct S { float A, B, C, D; }; float foo(struct S A) { return A.A + A.B+A.C+A.D; } into: _foo: ## @foo ## BB#0: ## %entry movd %xmm0, %rax shrq $32, %rax movd %eax, %xmm2 addss %xmm0, %xmm2 movapd %xmm1, %xmm3 addss %xmm2, %xmm3 movd %xmm1, %rax shrq $32, %rax movd %eax, %xmm0 addss %xmm3, %xmm0 ret instead of: _foo: ## @foo ## BB#0: ## %entry movd %xmm0, %rax movd %eax, %xmm0 shrq $32, %rax movd %eax, %xmm2 addss %xmm0, %xmm2 movd %xmm1, %rax movd %eax, %xmm1 addss %xmm2, %xmm1 shrq $32, %rax movd %eax, %xmm0 addss %xmm1, %xmm0 ret ... eliminating half of the horribleness. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112227 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
5f23a938b0fb7c2e3626c59b93d2fc2530cc4dc4 |
|
19-Jul-2010 |
Owen Anderson <resistor@mac.com> |
Tweak per Chris' comments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108736 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
d90290127b48f1135547956c6131883d905a71b6 |
|
19-Jul-2010 |
Owen Anderson <resistor@mac.com> |
Reimplement r108639 in InstCombine rather than DAGCombine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108687 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
28d2e0a39fb0dccb62a08520791070d13339d6e1 |
|
28-May-2010 |
Dan Gohman <gohman@apple.com> |
Fix instcombine's handling of alloca to accept non-i32 types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104935 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
5b71dcedf080550c16812bb7adc35e1c89374802 |
|
25-May-2010 |
Dan Gohman <gohman@apple.com> |
Fix a missing newline in debug output. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104644 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
6745191070503f669b07bc14cd6f7e518bd4d5b0 |
|
08-May-2010 |
Chris Lattner <sabre@nondot.org> |
Teach instcombine to transform a bitcast/(zext|trunc)/bitcast sequence with a vector input and output into a shuffle vector. This sort of sequence happens when the input code stores with one type and reloads with another type and then SROA promotes to i96 integers, which make everyone sad. This fixes rdar://7896024 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103354 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
a5ced590c95035793c2ae19bf70d6a0ed2c822a6 |
|
08-Apr-2010 |
Dan Gohman <gohman@apple.com> |
Say bitcast instead of bitconvert. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100720 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
1df9859c40492511b8aa4321eb76496005d3b75b |
|
16-Feb-2010 |
Duncan Sands <baldrick@free.fr> |
There are two ways of checking for a given type, for example isa<PointerType>(T) and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96344 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
b0bc6c361da9009e8414efde317d9bbff755f6c0 |
|
15-Feb-2010 |
Duncan Sands <baldrick@free.fr> |
Uniformize the names of type predicates: rather than having isFloatTy and isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
8c5ad3a5da7419af4d31963c3824836b5da52478 |
|
11-Feb-2010 |
Chris Lattner <sabre@nondot.org> |
Rename ValueRequiresCast to ShouldOptimizeCast, to better reflect what it does. Enhance it to return false to optimizing vector sign extensions from vector comparisions, which is the idiom used to get a splatted vector for a vector comparison. Doing this breaks vector-casts.ll, add some compensating transformations to handle the important case they cover without depending on this canonicalization. This fixes rdar://7434900 a serious pessimization of vector compares. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95855 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
3b5487e6276ba60484c1af10a857a1675462c102 |
|
02-Feb-2010 |
Dan Gohman <gohman@apple.com> |
LangRef.html says that inttoptr and ptrtoint always use zero-extension when the cast is extending. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95046 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
abb992d6a3d2dc05d3f3c62a367ea8977a7dd070 |
|
24-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
change the canonical form of "cond ? -1 : 0" to be "sext cond" instead of a select. This simplifies some instcombine code, matches the policy for zext (cond ? 1 : 0 -> zext), and allows us to generate better code for a testcase on ppc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94339 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
cd5adbbc0cef6ddf20c476ad2049104426198e15 |
|
18-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
my instcombine transformations to make extension elimination more aggressive changed the canonical form from sext(trunc(x)) to ashr(lshr(x)), make sure to transform a couple more things into that canonical form, and catch a case where we missed turning zext/shl/ashr into a single sext. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93787 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
53af2d13e763c2d6e8ea1baf29644d954edb999d |
|
11-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
reenable the piece that turns trunc(zext(x)) -> x even if zext has multiple uses, codegen has no apparent problem with the trunc version of this, because it turns into a simple subreg idiom git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93202 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
a958cbfe367ed7bf6a3a260b28a7b19cf70b7d9f |
|
11-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
Disable folding sext(trunc(x)) -> x (and other similar cast/cast cases) when the trunc has multiple uses. Codegen is not able to coalesce the subreg case correctly and so this leads to higher register pressure and spilling (see PR5997). This speeds up 256.bzip2 from 8.60 -> 8.04s on my machine, ~7%. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93200 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
7acc4b12813117774deefb54c5febb49a215aa70 |
|
11-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
Extend CanEvaluateZExtd to handle and/or/xor more aggressively in the BitsToClear case. This allows it to promote expressions which have an and/or/xor after the lshr, promoting cases like test2 (from PR4216) and test3 (random extample extracted from a spec benchmark). clang now compiles the code in PR4216 into: _test_bitfield: ## @test_bitfield movl %edi, %eax orl $194, %eax movl $4294902010, %ecx andq %rax, %rcx orl $32768, %edi andq $39936, %rdi movq %rdi, %rax orq %rcx, %rax ret instead of: _test_bitfield: ## @test_bitfield movl %edi, %eax orl $194, %eax movl $4294902010, %ecx andq %rax, %rcx shrl $8, %edi orl $128, %edi shlq $8, %rdi andq $39936, %rdi movq %rdi, %rax orq %rcx, %rax ret which is still not great, but is progress. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93145 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
789162a30971c3071a6c9edff3bc32084410e9dc |
|
11-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
Remove the dead TD argument to CanEvaluateZExtd, and add a new BitsToClear result which allows us to start promoting expressions that end with a lshr-by-constant. This is conservatively correct and better than what we had before (see testcases) but still needs to be extended further. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93144 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
8cf4f6f3ddd868116ea958870fa6f6a344028a60 |
|
11-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
improve comments, remove dead TD argument to CanEvaluateSExtd. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93143 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
11ea81242473027c67395e9e94396f4e2a282dda |
|
10-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
teach sext optimization to handle truncs from types that are not the dest of the sext. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93128 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
9ee947c224a157a5fb2c921a0e194fddedef2f9f |
|
10-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
teach zext optimization how to deal with truncs that don't come from the zext dest type. This allows us to handle test52/53 in cast.ll, and allows llvm-gcc to generate much better code for PR4216 in -m64 mode: _test_bitfield: ## @test_bitfield orl $32962, %edi movl %edi, %eax andl $-25350, %eax ret This also fixes a bug handling vector extends, ensuring that the mask produced is a vector constant, not an integer constant. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93127 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
aa9c89452348275da9765871217f2d5e274f5e92 |
|
10-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
simplify CanEvaluateSExtd to return a bool now that we have a simpler profitability predicate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93111 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
6954ceec1a8b22ce175453f0514db9c941414c3f |
|
10-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
the NumCastsRemoved argument to CanEvaluateSExtd is dead, remove it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93110 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
dde5ee5d37d05c326d33497e1dbd16f77191a1ae |
|
10-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
now that the cost model has changed, we can always consider elimination of a sign extend to be a win, which simplifies the client of CanEvaluateSExtd, and allows us to eliminate more casts (examples taken from real code). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93109 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
f4fb91181cbd3f63d487a2519c7f7be9d5e51709 |
|
10-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
change the preferred canonical form for a sign extension to be lshr+ashr instead of trunc+sext. We want to avoid type conversions whenever possible, it is easier to codegen expressions without truncates and extensions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93107 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
6091e0289bbd26b1eadf19f5c7dd21e429f9c00e |
|
10-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
fix pasto that broke bootstrap. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93105 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
9e390ddf91dcf7baa540330e1b9a73a0a177a2a6 |
|
10-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
simplify CanEvaluateZExtd now that we don't care about the number of bits known clear in the result and don't care about the # casts eliminated. TD is also dead but keeping it for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93098 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
5324d802835a677888ff020174c9eab5e86d6b15 |
|
10-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
two changes: 1) don't try to optimize a sext or zext that is only used by a trunc, let the trunc get optimized first. This avoids some pointless effort in some common cases since instcombine scans down a block in the first pass. 2) Change the cost model for zext elimination to consider an 'and' cheaper than a zext. This allows us to do it more aggressively, and for the next patch to simplify the code quite a bit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93097 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
d26c9e183e56d09f48d7074be4cacce099338316 |
|
10-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
enhance CanEvaluateZExtd to handle shift left and sext, allowing more expressions to be promoted and casts eliminated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93096 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
3f7dc880c4b558655cb8868ce29e1d2b27e2ea51 |
|
10-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
remove an xform subsumed by EvaluateInDifferentType. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93095 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
4f37978b900641893d62dca35ae20fcfce1cc7ce |
|
10-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
clean up this xform by using m_Trunc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93092 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
d84dfa43f25c4f4b84e51fc1060353a738a9812e |
|
10-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
inline and remove the rest of commonIntCastTransforms. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93091 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
75215c9e39e72ca9ffda0078b92286d03f1f5a3f |
|
10-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
Inline the expression type promotion/demotion stuff out of commonIntCastTransforms into the callers, eliminating a switch, and allowing the static predicate methods to be moved down to live next to the corresponding function. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93089 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
c8b3fce5c5f0785b05df9cf93772a67f56bc3640 |
|
08-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
mplement a theoretical fixme. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93024 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
14bf8f028587cea01b59d508885b6220850e9d4e |
|
08-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
rename CanEvaluateInDifferentType -> CanEvaluateTruncated and simplify it now that it is only used for truncates. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93021 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
075f6929393de708fbebbba053d2562d05ff0ce0 |
|
08-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
Enhance instcombine to reason more strongly about promoting computation that feeds into a zext, similar to the patch I did yesterday for sext. There is a lot of room for extension beyond this patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92962 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
5c24a6da29784a0b08cf4b1184e780b295951862 |
|
06-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
tweaks suggested by Duncan git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92824 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
e0e4cc7fd57999633141d19cbfe6369d1b4b0a1a |
|
06-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
Teach instcombine's sext elimination logic to be more aggressive. Previously, instcombine would only promote an expression tree to the larger type if doing so eliminated two casts. This is because a need to manually do the sign extend after the promoted expression tree with two shifts. Now, we keep track of whether the result of the computation is going to be properly sign extended already. If so, we can unconditionally promote the expression, which allows us to zap more sext's. This implements rdar://6598839 (aka gcc pr38751) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92815 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
68c6e8998b88339abadb0b8f3938a87f662beb35 |
|
06-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
simplify this code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
94aab49339ee1158b6aa7735ff1de9041ef2d334 |
|
05-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
make this a static function instead of a method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92795 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
7a34d6c450035dad9d494502c7c742137c42958e |
|
05-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
more rearrangement and cleanup, fix my test failure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92792 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
274ad68cc7d4e8dc9f02eb993e53d68ddcf258ee |
|
05-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
cleanup git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92790 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
c0f79af1438d3b11eedd5713ea08d4edbe52d8e3 |
|
05-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
remove two trunc xforms that are subsumed by EvaluateInDifferentType. The only difference is that EvaluateInDifferentType checks to ensure they are profitable before doing them :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92788 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
464dc8180318b18f71ed47acef091cd0839e36f7 |
|
05-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
just remove this xform which is subsumed by others. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92775 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
49bdfefc8df5c0073bf716c20400581565644e3f |
|
05-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
move a trunc-specific transform out of commonIntCastTransforms into visitTrunc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92773 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
718bf3f89d69f76791fec73b1edd55c450a93f12 |
|
05-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
move a zext specific xform out of commonIntCastTransforms into visitZExt and modernize it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92770 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
f86d799a290ca7ce5b7a98540c3bb80bf98c845e |
|
05-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
move a trunc-specific xform out of commonIntCastTransforms into visitTrunc git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
11acaa374cdcebb161bf0de5f244265d78a749c1 |
|
05-Jan-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Convert a ton of simple integer type equality tests to the new predicate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92760 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
f012705c7e4ca8cf90b6b734ce1d5355daca5ba5 |
|
05-Jan-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Avoid going through the LLVMContext for type equality where it's safe to dereference the type pointer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92726 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
f3d1b5dd68b8c9fe15158ce330a8b1949269e3df |
|
04-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
move some more cast-related stuff git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92471 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
5f0290e0ef6225114a04517744bf20e93040d2e4 |
|
04-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
move the [Can]EvaluateInDifferentType functions out to InstCombineCasts.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
80f43d339f0a5904c62ca6268939c14ab148b94f |
|
04-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
split 943 lines of instcombine out to a new InstCombineCasts.cpp file. InstructionCombining.cpp is now down to a svelte 9300 lines :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92468 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|