1. Use shuffle to insert element i1 into vector. The previous implementation was incorrect ( dest_bit OR src_bit , it doesn't clear the bit if src_bit=0 )
2. Improve shuffle i1 vector, use CVT2MASK if supported instead TRUNCATE.
Differential Revision: http://reviews.llvm.org/D23347
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278623 91177308-0d34-0410-b5e6-96231b3b80d8
This reverts commit r278288.
r278287 broke the clang-cmake-thumbv7-a15-full-sh bot.
Revert this so we can get to r278287.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278620 91177308-0d34-0410-b5e6-96231b3b80d8
IRCE has the ability to further version pre-loops and post-loops that it
created, but this isn't useful at all. This change teaches IRCE to
leave behind some metadata in the loops it creates (by cloning the main
loop) so that these new loops are not re-processed by IRCE.
Today this bug is hidden by another bug -- IRCE does not update LoopInfo
properly so the loop pass manager does not re-invoke IRCE on the loops
it split out. However, once the latter is fixed the bug addressed in
this change causes IRCE to infinite-loop in some cases (e.g. it splits
out a pre-loop, a pre-pre-loop from that, a pre-pre-pre-loop from that
and so on).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278617 91177308-0d34-0410-b5e6-96231b3b80d8
The auto-upgrade path could be called before the VST (global
names) was fully parsed, and thus intrinsic names were not
available and the autoupgrade logic could not operate.
Fix link failures with ThinLTO.
This is a recommit of r278610 with a different fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278615 91177308-0d34-0410-b5e6-96231b3b80d8
LowerTargetConstantPool is not properly setting the TargetFlag to indicate
desired relocation. Coding error, the offset parameter was omitted, so the
TargetFlag was used as the offset, and the TargetFlag defaulted to zero.
This only affects -fpic compilation, and only those items created in a
Constant Pool, for example a vector of constants. Halide ran into this issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278614 91177308-0d34-0410-b5e6-96231b3b80d8
The (negative) test case is supposed to check that IRCE does not muck
with range checks it cannot handle, not that it does the right thing in
the absence of profiling information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278612 91177308-0d34-0410-b5e6-96231b3b80d8
Loops containing `indirectbr` may not be in simplified form, even after
running LoopSimplify. Reject then gracefully, instead of tripping an
assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278611 91177308-0d34-0410-b5e6-96231b3b80d8
The auto-upgrade path could be called before the VST (global
names) was fully parsed, and thus intrinsic names were not
available and the autoupgrade logic could not operate.
Fix link failures with ThinLTO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278610 91177308-0d34-0410-b5e6-96231b3b80d8
This reverts commit r278600. The unittest does not pass on MSVC, there is
an extra move. Investigating how to make it more robust.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278603 91177308-0d34-0410-b5e6-96231b3b80d8
This saves us the trouble of ending up in the default of the switch and having to determine if this is an FMA or not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278597 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
Refactor the existing support into a LoopDataPrefetch implementation
class and a LoopDataPrefetchLegacyPass class that invokes it.
Add a new LoopDataPrefetchPass for the new pass manager that utilizes
the LoopDataPrefetch implementation class.
Reviewers: mehdi_amini
Subscribers: sanjoy, mzolotukhin, nemanjai, llvm-commits
Differential Revision: https://reviews.llvm.org/D23483
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278591 91177308-0d34-0410-b5e6-96231b3b80d8
Almost all of the method here are only analysing Value's as opposed to
mutating them. Mark all of the easy ones as const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278585 91177308-0d34-0410-b5e6-96231b3b80d8
`IVVisitor::visitCast` used to have the invariant that if the
instruction it was passed was a sext or zext instruction, the result of
the instruction would be wider than the induction variable. This is no
longer true after rL275037, so this change teaches `IndVarSimplify` s
implementation of `IVVisitor::visitCast` to work with the relaxed
invariant.
A corresponding change to SimplifyIndVar to preserve the said invariant
after rL275037 would also work, but given how `IVVisitor::visitCast` is
spelled (no indication of said invariant), I figured the current fix is
cleaner.
Fixes PR28935.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278584 91177308-0d34-0410-b5e6-96231b3b80d8