llvm-project/llvm/test/CodeGen
Geoff Berry 5d534b6a11 [CodeGenPrepare] Sink and duplicate more 'and' instructions.
Summary:
Rework the code that was sinking/duplicating (icmp and, 0) sequences
into blocks where they were being used by conditional branches to form
more tbz instructions on AArch64.  The new code is more general in that
it just looks for 'and's that have all icmp 0's as users, with a target
hook used to select which subset of 'and' instructions to consider.
This change also enables 'and' sinking for X86, where it is more widely
beneficial than on AArch64.

The 'and' sinking/duplicating code is moved into the optimizeInst phase
of CodeGenPrepare, where it can take advantage of the fact the
OptimizeCmpExpression has already sunk/duplicated any icmps into the
blocks where they are used.  One minor complication from this change is
that optimizeLoadExt needed to be updated to always mark 'and's it has
determined should be in the same block as their feeding load in the
InsertedInsts set to avoid an infinite loop of hoisting and sinking the
same 'and'.

This change fixes a regression on X86 in the tsan runtime caused by
moving GVNHoist to a later place in the optimization pipeline (see
PR31382).

Reviewers: t.p.northover, qcolombet, MatzeB

Subscribers: aemerson, mcrosier, sebpop, llvm-commits

Differential Revision: https://reviews.llvm.org/D28813

llvm-svn: 295746
2017-02-21 18:53:14 +00:00
..
AArch64 [CodeGenPrepare] Sink and duplicate more 'and' instructions. 2017-02-21 18:53:14 +00:00
AMDGPU llvm/test/CodeGen/AMDGPU/r600.alu-limits.ll should require +Asserts. This would run into infinite loop anyways with -Asserts. 2017-02-19 02:31:06 +00:00
ARM [ARM] GlobalISel: Lower calls to void() functions 2017-02-21 11:33:59 +00:00
AVR [AVR] Implement stacksave/stackrestore by expanding (PR31342) 2017-02-05 21:35:45 +00:00
BPF Revert "In visitSTORE, always use FindBetterChain, rather than only when UseAA is enabled." 2017-02-02 18:24:55 +00:00
Generic Implement intrinsic mangling for literal struct types. 2017-02-15 23:16:20 +00:00
Hexagon [Hexagon] Start using regmasks on calls 2017-02-17 22:14:51 +00:00
Inputs
Lanai [lanai] Simplify small section check in LowerGlobalAddress and treat ldata sections specially. 2016-12-15 16:56:16 +00:00
MIR MIR: parse & print the atomic parts of a MachineMemOperand. 2017-02-13 22:14:08 +00:00
MSP430 Revert "In visitSTORE, always use FindBetterChain, rather than only when UseAA is enabled." 2017-02-02 18:24:55 +00:00
Mips [LLVM][XRAY][MIPS] Support xray on mips/mipsel/mips64/mips64el 2017-02-15 10:48:11 +00:00
NVPTX [NVPTX] Add tests that invariant vector loads get lowered to ld.global.nc. 2017-02-04 01:54:56 +00:00
PowerPC [PowerPC] add tests for select-of-constants; NFC 2017-02-17 16:43:43 +00:00
SPARC Codegen: Make chains from trellis-shaped CFGs 2017-02-15 19:49:14 +00:00
SystemZ [TLI] Robustize SDAG LibFunc proto checking by merging it into TLI. 2017-02-03 19:11:19 +00:00
Thumb In Thumb1 mode, the custom lowering for ARMISD::CMPZ could never emit tADDi3 2017-02-17 18:59:16 +00:00
Thumb2 [ARM] Replace HasT2ExtractPack with HasDSP 2017-02-17 15:42:44 +00:00
WebAssembly Codegen: Make chains from trellis-shaped CFGs 2017-02-15 19:49:14 +00:00
WinEH Avoid infinite loops in branch folding 2016-12-12 23:05:38 +00:00
X86 [CodeGenPrepare] Sink and duplicate more 'and' instructions. 2017-02-21 18:53:14 +00:00
XCore Move some error handling down to MCStreamer. 2017-02-10 15:13:12 +00:00