| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
vectors"
It broke stage2 build. stage1/clang sometimes crashed.
llvm-svn: 155699
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 155682
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
constants in C++11 mode. I have no idea why it required such particular
circumstances to get here, the code seems clearly to rely upon unchecked
assumptions.
Specifically, when we decide to form an index into a struct type, we may
have gone through (at least one) zero-length array indexing round, which
would have left the offset un-adjusted, and thus not necessarily valid
for use when indexing the struct type.
This is just an canonicalization step, so the correct thing is to refuse
to canonicalize nonsensical GEPs of this form. Implemented, and test
case added.
Fixes PR12642. Pair debugged and coded with Richard Smith. =] I credit
him with most of the debugging, and preventing me from writing the wrong
code.
llvm-svn: 155466
|
|
|
|
| |
llvm-svn: 149967
|
|
|
|
|
|
| |
instead of always using ConstantVector.
llvm-svn: 149912
|
|
|
|
|
|
|
|
|
| |
but with a critical fix to the SelectionDAG code that optimizes copies
from strings into immediate stores: the previous code was stopping reading
string data at the first nul. Address this by adding a new argument to
llvm::getConstantStringInfo, preserving the behavior before the patch.
llvm-svn: 149800
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
test to fail.
These are:
r149348
r149351
r149352
r149354
r149356
r149357
r149361
r149362
r149364
r149365
llvm-svn: 149470
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
kicking in the big win of ConstantDataArray. As part of this, change
the implementation of GetConstantStringInfo in ValueTracking to work
with ConstantDataArray (and not ConstantArray) making it dramatically,
amazingly, more efficient in the process and renaming it to
getConstantStringInfo.
This keeps around a GetConstantStringInfo entrypoint that (grossly)
forwards to getConstantStringInfo and constructs the std::string
required, but existing clients should move over to
getConstantStringInfo instead.
llvm-svn: 149351
|
|
|
|
|
|
| |
width.
llvm-svn: 149151
|
|
|
|
|
|
|
| |
Unfortunately I also had to disable constant-pool-sharing.ll the code it tests has been
updated to use the IL logic.
llvm-svn: 149148
|
|
|
|
|
|
| |
ConstantVector's to integer type.
llvm-svn: 149110
|
|
|
|
|
|
|
|
| |
we're at it, allow PatternMatch's "neg" pattern to match integer
vector negations, and enhance ComputeNumSigned bits to handle
shl of vectors.
llvm-svn: 149082
|
|
|
|
| |
llvm-svn: 148934
|
|
|
|
| |
llvm-svn: 148897
|
|
|
|
|
|
|
|
|
|
| |
out into a new ConstantFoldLoadThroughGEPIndices (more useful) function
and rewrite it to be simpler, more efficient, and to handle the new
ConstantDataSequential type.
Enhance ConstantFoldLoadFromConstPtr to handle ConstantDataSequential.
llvm-svn: 148786
|
|
|
|
| |
llvm-svn: 148578
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
indicates whether the intrinsic has a defined result for a first
argument equal to zero. This will eventually allow these intrinsics to
accurately model the semantics of GCC's __builtin_ctz and __builtin_clz
and the X86 instructions (prior to AVX) which implement them.
This patch merely sets the stage by extending the signature of these
intrinsics and establishing auto-upgrade logic so that the old spelling
still works both in IR and in bitcode. The upgrade logic preserves the
existing (inefficient) semantics. This patch should not change any
behavior. CodeGen isn't updated because it can use the existing
semantics regardless of the flag's value.
Note that this will be followed by API updates to Clang and DragonEgg.
Reviewed by Nick Lewycky!
llvm-svn: 146357
|
|
|
|
| |
llvm-svn: 145801
|
|
|
|
|
|
| |
rdar://10514247
llvm-svn: 145730
|
|
|
|
|
|
| |
for the suggestion, Eric.
llvm-svn: 145643
|
|
|
|
|
|
| |
TLI isn't being passed to ensure we don't miss opportunities to fold calls.
llvm-svn: 145641
|
|
|
|
|
|
| |
rdar://10500969
llvm-svn: 145639
|
|
|
|
|
|
|
| |
InstructionSimplify.cpp. Other fixups as needed.
Part of rdar://10500969
llvm-svn: 145559
|
|
|
|
|
|
|
| |
Optimize chained bitcasts of the form A->B->A.
Undo r138722 and change isEliminableCastPair to allow this case.
llvm-svn: 138756
|
|
|
|
| |
llvm-svn: 138722
|
|
|
|
| |
llvm-svn: 138469
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 20a05be15ea5271ab6185b83200fa88263362400. (svn rev 138340)
Conflicts:
test/Transforms/InstCombine/bitcast.ll
llvm-svn: 138366
|
|
|
|
|
|
|
| |
1. Cleanup the tests in ConstantFolding.cpp
2. Implement isAllOnes for Constant, ConstantFP, ConstantVector
llvm-svn: 138340
|
|
|
|
| |
llvm-svn: 138206
|
|
|
|
| |
llvm-svn: 135904
|
|
|
|
|
|
| |
ConstantExpr::getInBoundsGetElementPtr to use ArrayRef.
llvm-svn: 135673
|
|
|
|
| |
llvm-svn: 135478
|
|
|
|
| |
llvm-svn: 135477
|
|
|
|
| |
llvm-svn: 135375
|
|
|
|
| |
llvm-svn: 135040
|
|
|
|
|
|
|
|
| |
This reverts commit e8e00f5efb4a22238f2407bf813de4606f30c5aa.
The cmake build on OS X is still broken.
llvm-svn: 133718
|
|
|
|
|
|
| |
It broke the build worse.
llvm-svn: 133716
|
|
|
|
| |
llvm-svn: 133714
|
|
|
|
|
|
|
|
| |
It has only one user. This eliminates the last include of
config.h from the public headers -- ideally, config.h
shouldn't even be installed by `make install` anymore.
llvm-svn: 133713
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
all over the place in different styles and variants. Standardize on two
preferred entrypoints: one that takes a StructType and ArrayRef, and one that
takes StructType and varargs.
In cases where there isn't a struct type convenient, we now add a
ConstantStruct::getAnon method (whose name will make more sense after a few
more patches land).
It would be "really really nice" if the ConstantStruct::get and
ConstantVector::get methods didn't make temporary std::vectors.
llvm-svn: 133412
|
|
|
|
|
|
| |
C99 runtimes don't have exp2).
llvm-svn: 131872
|
|
|
|
| |
llvm-svn: 129271
|
|
|
|
|
|
| |
identical to the smul.with.overflow() code.
llvm-svn: 128379
|
|
|
|
| |
llvm-svn: 125537
|
|
|
|
|
|
| |
builders unhappy.
llvm-svn: 125504
|
|
|
|
|
|
| |
idiom. Change various clients to simplify their code.
llvm-svn: 125487
|
|
|
|
| |
llvm-svn: 124990
|
|
|
|
|
|
| |
resulting pointer type both have the same size.
llvm-svn: 124987
|
|
|
|
|
|
|
|
|
|
|
| |
with BasicAA's DecomposeGEPExpression, which recently began
using a TargetData. This fixes PR8968, though the testcase
is awkward to reduce.
Also, update several off GetUnderlyingObject's users
which happen to have a TargetData handy to pass it in.
llvm-svn: 124134
|
|
|
|
| |
llvm-svn: 123562
|