llvm-project/llvm/test/CodeGen
Craig Topper b172b8884a [BypassSlowDivision] Teach bypass slow division not to interfere with div by constant where constants have been constant hoisted, but not moved from their basic block
DAGCombiner doesn't pay attention to whether constants are opaque before doing the div by constant optimization. So BypassSlowDivision shouldn't introduce control flow that would make DAGCombiner unable to see an opaque constant. This can occur when a div and rem of the same constant are used in the same basic block. it will be hoisted, but not leave the block.

Longer term we probably need to look into the X86 immediate cost model used by constant hoisting and maybe not mark div/rem immediates for hoisting at all.

This fixes the case from PR38649.

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

llvm-svn: 340303
2018-08-21 17:15:33 +00:00
..
AArch64 Revert "Revert r339977: [GISel]: Add Opcodes for a few LLVM Intrinsics" 2018-08-20 18:43:19 +00:00
AMDGPU [AMDGPU] Support idot2 pattern. 2018-08-21 16:21:15 +00:00
ARC
ARM [DAGCombiner] Reduce load widths of shifted masks 2018-08-21 10:26:59 +00:00
AVR
BPF bpf: add missing RegState to notify MachineInstr verifier necessary register usage 2018-07-27 16:58:52 +00:00
Generic [DWARF] Unclamp line table version on Darwin for v5 and later. 2018-08-08 21:16:50 +00:00
Hexagon Change how finalizeBundle selects debug location for the BUNDLE instruction 2018-08-21 10:59:50 +00:00
Inputs
Lanai
MIR Consistently use MemoryLocation::UnknownSize to indicate unknown access size 2018-08-20 20:37:57 +00:00
MSP430
Mips [MIPS GlobalISel] Select bitwise instructions 2018-08-21 08:15:56 +00:00
NVPTX DAG: Check no-signed-zeros instead of unsafe-fp-math 2018-08-12 19:09:12 +00:00
Nios2
PowerPC [PowerPC] Add a peephole post RA to transform the inst that fed by add 2018-08-20 02:52:55 +00:00
RISCV [SelectionDAG] Improve the legalisation lowering of UMULO. 2018-08-16 18:39:39 +00:00
SPARC [Sparc] Get sret arg size from CallLoweringInfo.getArgs() 2018-08-17 10:40:00 +00:00
SystemZ [SystemZ] Require asserts in subregliveness-06.mir 2018-08-16 20:12:15 +00:00
Thumb [SelectionDAG] Improve the legalisation lowering of UMULO. 2018-08-16 18:39:39 +00:00
Thumb2 [SelectionDAG] Improve the legalisation lowering of UMULO. 2018-08-16 18:39:39 +00:00
WebAssembly [WebAssembly] Revert type of wake count in atomic.wake to i32 2018-08-20 23:49:29 +00:00
WinCFGuard Rename the cfguard module flag to cfguardtable 2018-08-10 09:48:53 +00:00
WinEH
X86 [BypassSlowDivision] Teach bypass slow division not to interfere with div by constant where constants have been constant hoisted, but not moved from their basic block 2018-08-21 17:15:33 +00:00
XCore [DAGCombiner] extend(ifpositive(X)) -> shift-right (not X) 2018-07-15 16:27:07 +00:00