History log of /external/llvm/test/Other/constant-fold-gep.ll
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cd81d94322a39503e4a3e87b6ee03d4fcb3465fb 21-Jul-2014 Stephen Hines <srhines@google.com> Update LLVM for rebase to r212749.

Includes a cherry-pick of:
r212948 - fixes a small issue with atomic calls

Change-Id: Ib97bd980b59f18142a69506400911a6009d9df18
/external/llvm/test/Other/constant-fold-gep.ll
59d3ae6cdc4316ad338cd848251f33a236ccb36c 15-Nov-2013 Matt Arsenault <Matthew.Arsenault@amd.com> Add addrspacecast instruction.

Patch by Michele Scandale!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194760 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Other/constant-fold-gep.ll
8df7c39976890d94198d835e032848a374fec158 27-Feb-2013 Meador Inge <meadori@codesourcery.com> IR: Don't constant fold GEP bitcasts between different address spaces

PR15262 reported a bug where the following instruction:

i8 getelementptr inbounds i8* bitcast ([4 x i8] addrspace(12)* @buf to i8*),
i32 2

was getting folded into:

addrspace(12)* getelementptr inbounds ([4 x i8] addrspace(12)* @buf, i32 0,
i32 2)

This caused instcombine to crash because the original instruction and
the folded instruction have different types. The issue was fixed by
disallowing bitcasts between different address spaces to be folded away.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176156 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Other/constant-fold-gep.ll
7ab6c76ad1cbf36284ca5b6bd5ee33c625fe3e60 20-Feb-2013 Bill Wendling <isanbard@gmail.com> Modify the LLVM assembly output so that it uses references to represent function attributes.

This makes the LLVM assembly look better. E.g.:

define void @foo() #0 { ret void }
attributes #0 = { nounwind noinline ssp }


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Other/constant-fold-gep.ll
03e091f0b5f43beee12170efc00bbab86ffeb0dc 27-Apr-2012 Dan Gohman <gohman@apple.com> Reapply r155682, making constant folding more consistent, with a fix to work
properly with how the code handles all-undef PHI nodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155721 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Other/constant-fold-gep.ll
d213ee764341b5bf6664469a5404fe19c9732828 27-Apr-2012 NAKAMURA Takumi <geek4civic@gmail.com> Revert r155682, "Use ConstantExpr::getExtractElement when constant-folding vectors"

It broke stage2 build. stage1/clang sometimes crashed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155699 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Other/constant-fold-gep.ll
97b44f9b8026fce47c1c882347f88af91c6e74c1 27-Apr-2012 Dan Gohman <gohman@apple.com> Use ConstantExpr::getExtractElement when constant-folding vectors
instead of getAggregateElement. This has the advantage of being
more consistent and allowing higher-level constant folding to
procede even if an inner extract element cannot be folded.

Make ConstantFoldInstruction call ConstantFoldConstantExpression
on the instruction's operands, making it more consistent with
ConstantFoldConstantExpression itself. This makes sure that
ConstantExprs get TargetData-aware folding before being handed
off as operands for further folding.

This causes more expressions to be folded, but due to a known
shortcoming in constant folding, this currently has the side effect
of stripping a few more nuw and inbounds flags in the non-targetdata
side of constant-fold-gep.ll. This is mostly harmless.

This fixes rdar://11324230.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155682 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Other/constant-fold-gep.ll
3ba19b1045a97dadc4baa1f3d44a5f549194a2b3 15-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Fix test.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146642 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Other/constant-fold-gep.ll
adeb0a6e64c5a63e891e016226645f9595d00959 15-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Make constant folding for GEPs a bit more aggressive.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146639 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Other/constant-fold-gep.ll
1afcace3a3a138b1b18e5c6270caa8dae2261ae2 09-Jul-2011 Chris Lattner <sabre@nondot.org> Land the long talked about "type system rewrite" patch. This
patch brings numerous advantages to LLVM. One way to look at it
is through diffstat:
109 files changed, 3005 insertions(+), 5906 deletions(-)

Removing almost 3K lines of code is a good thing. Other advantages
include:

1. Value::getType() is a simple load that can be CSE'd, not a mutating
union-find operation.
2. Types a uniqued and never move once created, defining away PATypeHolder.
3. Structs can be "named" now, and their name is part of the identity that
uniques them. This means that the compiler doesn't merge them structurally
which makes the IR much less confusing.
4. Now that there is no way to get a cycle in a type graph without a named
struct type, "upreferences" go away.
5. Type refinement is completely gone, which should make LTO much MUCH faster
in some common cases with C++ code.
6. Types are now generally immutable, so we can use "Type *" instead
"const Type *" everywhere.

Downsides of this patch are that it removes some functions from the C API,
so people using those will have to upgrade to (not yet added) new API.
"LLVM 3.0" is the right time to do this.

There are still some cleanups pending after this, this patch is large enough
as-is.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134829 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Other/constant-fold-gep.ll
61c70e98ac3c7504d31dd9bc81c4e9cb998e9984 28-Aug-2010 Chris Lattner <sabre@nondot.org> remove unions from LLVM IR. They are severely buggy and not
being actively maintained, improved, or extended.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112356 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Other/constant-fold-gep.ll
0891d752a68a25025ffc3339aab1f0ad3221b0ed 10-Mar-2010 Dan Gohman <gohman@apple.com> Constant-fold GEP-of-GEP into a single GEP.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98178 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Other/constant-fold-gep.ll
a77338476f55c2034abee901c5cd2955641bc990 10-Mar-2010 Dan Gohman <gohman@apple.com> Fix whitespace.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98173 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Other/constant-fold-gep.ll
9ee0d8a917a90380afc65c5b8fcea9d9975e6749 25-Feb-2010 Dan Gohman <gohman@apple.com> Teach the constant folder about union types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97142 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Other/constant-fold-gep.ll
a84ffedafc102013a935817f30485a47d3dc2383 10-Feb-2010 Dan Gohman <gohman@apple.com> Canonicalize sizeof and alignof on pointer types to a canonical
pointer type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95769 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Other/constant-fold-gep.ll
6acb86dcfa1ff4e38d2f189ab09e3fbe22f248a7 02-Feb-2010 Dan Gohman <gohman@apple.com> Factor out alignof expression folding into a separate function and
generalize it to handle more cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95045 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Other/constant-fold-gep.ll
4f8eea82d8967cffa85b9df6c9255717b059009e 01-Feb-2010 Dan Gohman <gohman@apple.com> Generalize target-independent folding rules for sizeof to handle more
cases, and implement target-independent folding rules for alignof and
offsetof. Also, reassociate reassociative operators when it leads to
more folding.

Generalize ScalarEvolution's isOffsetOf to recognize offsetof on
arrays. Rename getAllocSizeExpr to getSizeOfExpr, and getFieldOffsetExpr
to getOffsetOfExpr, for consistency with analagous ConstantExpr routines.

Make the target-dependent folder promote GEP array indices to
pointer-sized integers, to make implicit casting explicit and exposed
to subsequent folding.

And add a bunch of testcases for this new functionality, and a bunch
of related existing functionality.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Other/constant-fold-gep.ll
8ca83b4111972f626a3e3f9af41f55718bf68927 28-Jan-2010 Dan Gohman <gohman@apple.com> Remove the folding rule
getelementptr (i8* inttoptr (i64 1 to i8*), i32 -1)
to
inttoptr (i64 0 to i8*)
from the VMCore constant folder. It didn't handle sign-extension properly
in the case where the source integer is smaller than a pointer size. And,
it relied on an assumption about sizeof(i8).

The Analysis constant folder still folds these kinds of things; it has
access to TargetData, so it can do them right.

Add a testcase which tests that the VMCore constant folder doesn't
miscompile this, and that the Analysis folder does fold it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94750 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Other/constant-fold-gep.ll