1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
llvm-mirror/lib
Hal Finkel 142a9fc3fb Revert r185257 (InstCombine: Be more agressive optimizing 'udiv' instrs with 'select' denoms)
I'm reverting this commit because:

 1. As discussed during review, it needs to be rewritten (to avoid creating and
then deleting instructions).

 2. This is causing optimizer crashes. Specifically, I'm seeing things like
this:

    While deleting: i1 %
    Use still stuck around after Def is destroyed:  <badref> = select i1 <badref>, i32 0, i32 1
    opt: /src/llvm-trunk/lib/IR/Value.cpp:79: virtual llvm::Value::~Value(): Assertion `use_empty() && "Uses remain when a value is destroyed!"' failed.

   I'd guess that these will go away once we're no longer creating/deleting
instructions here, but just in case, I'm adding a regression test.

Because the code is bring rewritten, I've just XFAIL'd the original regression test. Original commit message:

	InstCombine: Be more agressive optimizing 'udiv' instrs with 'select' denoms

	Real world code sometimes has the denominator of a 'udiv' be a
	'select'.  LLVM can handle such cases but only when the 'select'
	operands are symmetric in structure (both select operands are a constant
	power of two or a left shift, etc.).  This falls apart if we are dealt a
	'udiv' where the code is not symetric or if the select operands lead us
	to more select instructions.

	Instead, we should treat the LHS and each select operand as a distinct
	divide operation and try to optimize them independently.  If we can
	to simplify each operation, then we can replace the 'udiv' with, say, a
	'lshr' that has a new select with a bunch of new operands for the
	select.

llvm-svn: 185415
2013-07-02 05:21:11 +00:00
..
Analysis ValueTracking: Teach isKnownToBeAPowerOfTwo about (ADD X, (XOR X, Y)) where X is a power of two 2013-06-29 23:44:53 +00:00
AsmParser Added support for the Builtin attribute. 2013-06-27 00:25:01 +00:00
Bitcode Remove the Copied parameter from MemoryObject::readBytes. 2013-05-24 10:54:58 +00:00
CodeGen PR14728: DebugInfo: TLS variables with -gsplit-dwarf 2013-07-01 23:55:52 +00:00
DebugInfo Spell correct (s/begining/beginning/) 2013-06-19 21:42:05 +00:00
ExecutionEngine AArch64: correct CodeGen of MOVZ/MOVK combinations. 2013-07-01 19:23:10 +00:00
IR IRVerifier: Correctly check attribute types 2013-07-02 03:28:10 +00:00
IRReader keep only the StringRef version of getFileOrSTDIN. 2013-06-25 05:28:34 +00:00
Linker Extend RemapInstruction and friends to take an optional new parameter, a ValueMaterializer. 2013-05-28 15:17:05 +00:00
MC [PowerPC] Add support for TLS data relocations 2013-07-01 23:33:29 +00:00
Object Make a switch in createBinary fully-covered. Add forgotten macho_dsym_companion case. 2013-06-28 09:44:05 +00:00
Option Fix a crash bug in dumping options with groups 2013-06-26 22:43:37 +00:00
Support [APFloat] Ensure that we can properly parse strings that do not have null terminators. 2013-07-01 23:54:08 +00:00
TableGen keep only the StringRef version of getFileOrSTDIN. 2013-06-25 05:28:34 +00:00
Target Cleanup PPC Altivec registers in CSR lists and improve VRSAVE handling 2013-07-02 03:39:34 +00:00
Transforms Revert r185257 (InstCombine: Be more agressive optimizing 'udiv' instrs with 'select' denoms) 2013-07-02 05:21:11 +00:00
CMakeLists.txt Move lib/Archive to tools/llvm-ar. 2013-06-17 15:47:20 +00:00
LLVMBuild.txt Move lib/Archive to tools/llvm-ar. 2013-06-17 15:47:20 +00:00
Makefile Move lib/Archive to tools/llvm-ar. 2013-06-17 15:47:20 +00:00