Don't bother returning a result we don't use here. I've also renamed
this from selectGather to tryGather to better indicate that it may not
do anything.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269215 91177308-0d34-0410-b5e6-96231b3b80d8
SCEVExpander::replaceCongruentIVs assumes the backedge value of an
SCEV-analysable PHI to always be an instruction, when this is not
necessarily true. For now address this by bailing out of the
optimization if the backedge value of the PHI is a non-Instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269213 91177308-0d34-0410-b5e6-96231b3b80d8
`SCEVExpander::replaceCongruentIVs` bypasses `hoistIVInc` if both the
original and the isomorphic increments are PHI nodes. Doing this can
break SSA if the isomorphic increment is not dominated by the original
increment. Get rid of the bypass, and let `hoistIVInc` do the right
thing.
Fixes PR27232 (compile time crash/hang).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269212 91177308-0d34-0410-b5e6-96231b3b80d8
... for AddRec's in loops for which SCEV is unable to compute a max
tripcount. This is not a problem for "normal" loops[0] that don't have
guards or assumes, but helps in cases where we have guards or assumes in
the loop that can be used to constrain incoming values over the backedge.
This partially fixes PR27691 (we still don't handle the NUW case).
[0]: for "normal" loops, in the cases where we'd be able to prove
no-wrap via isKnownPredicate, we'd also be able to compute a max
tripcount.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269211 91177308-0d34-0410-b5e6-96231b3b80d8
DbgInfoIntrinsic::StripCast() is dead since r79977
The only function that creates Comdat objects seems to be in Module, and always creates them using the default constructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269204 91177308-0d34-0410-b5e6-96231b3b80d8
Equivalent GEP indices with different types are treated as different
indices altogether, leading to an incorrect AA result. Fix the issue
by comparing indices based on their values.
Thanks to Mikael Holmén for reporting the issue!
Differential Revision: http://reviews.llvm.org/D19935
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269197 91177308-0d34-0410-b5e6-96231b3b80d8
microMIPS has a special case that is not correctly implemented in LLVM. If we
have a symbol 'foo' which is equivalent to '.text+0x10'. The value of an
R_MICROMIPS_LO16 relocation using 'foo' is 'foo+0x11' and not 'foo+0x10'. The
in-place addend should therefore be 0x11.
Work around this by partially reverting the effect of r268900 by keeping the
symbol when the STO_MIPS_MICROMIPS flag is set. This fixes
SingleSource/Regression/C/PR640 for microMIPS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269196 91177308-0d34-0410-b5e6-96231b3b80d8
When generating .cfi_offset instructions, make sure that the offset is
calculated with respect to the register used to define the CFA (which is
currently always FP+8).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269191 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
r268058 unintentionally made the retrieval of the current assembler temporary
unconditional. This was fine for the existing tests but it broke the cases
where the assembler temporary is not needed (N32/N64 or not PIC) and is
unavailable due to a '.set noat' directive.
This fixes FreeBSD's libc.
Reviewers: emaste, sdardis, seanbruno
Subscribers: dsanders, emaste, sdardis, llvm-commits
Differential Revision: http://reviews.llvm.org/D20093
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269179 91177308-0d34-0410-b5e6-96231b3b80d8
Having it be special is quite annoying for being able to just run
git-clang-format in patches that change it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269175 91177308-0d34-0410-b5e6-96231b3b80d8
Summary: When emitting comparison for fp16, in addition to promote the LHS and RHS to fp32, we need to change the VT as well.
Reviewers: t.p.northover
Subscribers: t.p.northover, aemerson, rengolin, llvm-commits
Differential Revision: http://reviews.llvm.org/D19922
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269151 91177308-0d34-0410-b5e6-96231b3b80d8
Use WeakAny linkage instead of LinkOnceAny, as the symbol can be removed with
LinkOnceAny in O2 (not referenced).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269146 91177308-0d34-0410-b5e6-96231b3b80d8
This is part of the work to have Select return void instead of an
SDNode *, which is in turn part of llvm.org/pr26808.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269144 91177308-0d34-0410-b5e6-96231b3b80d8
Summary: In sample profile, some branches may have profile missing due to profile inaccuracy. We want existing branch probability still valid after propagation.
Reviewers: hfinkel, davidxl, spatel
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D19948
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269137 91177308-0d34-0410-b5e6-96231b3b80d8
This means SelectCode unconditionally returns nullptr now. I'll follow
up with a change to make that return void as well, but it seems best
to keep that one very mechanical.
This is part of the work to have Select return void instead of an
SDNode *, which is in turn part of llvm.org/pr26808.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269136 91177308-0d34-0410-b5e6-96231b3b80d8
Unlike xN/wN, the size of vN is genuinely ambiguous in the assembly, so we
should try to infer what was intended from the type. But only down to 64-bits
(vN can never represent sN, hN or bN).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269132 91177308-0d34-0410-b5e6-96231b3b80d8
This reverts commit r269125. It was in my tree when I ran "git svn dcommit".
It's really still under review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269127 91177308-0d34-0410-b5e6-96231b3b80d8
Sort of the BB-local equivalent to idiom-recognizer: if we have a basic-block
that really implements a memcpy operation, backends can benefit from seeing
this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269125 91177308-0d34-0410-b5e6-96231b3b80d8
Before r268509, Clang would disable the loop unroll pass when optimizing
for size. That commit enabled it to be able to support unroll pragmas
in -Os builds. However, this regressed binary size in one of Chromium's
DLLs with ~100 KB.
This restores the original behaviour of no unrolling at -Os, but doing it
in LLVM instead of Clang makes more sense, and also allows the pragmas to
keep working.
Differential revision: http://reviews.llvm.org/D20115
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269124 91177308-0d34-0410-b5e6-96231b3b80d8
This is a bit of a spot fix for now. I'll try to fix this up more
comprehensively soon.
This is part of the work to have Select return void instead of an
SDNode *, which is in turn part of llvm.org/pr26808.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269120 91177308-0d34-0410-b5e6-96231b3b80d8
This fixes a bug introduced in r267623, where we got smarter and avoided to save
EAX before using it. However, we failed to check if any of the subregister of
EAX were alive and thus, missed cases where we have to save EAX before using it.
The problem may happen on every X86/i386/... platform.
This fixes llvm.org/PR27624
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269115 91177308-0d34-0410-b5e6-96231b3b80d8