diff options
| author | Hal Finkel <hfinkel@anl.gov> | 2013-07-02 05:21:11 +0000 |
|---|---|---|
| committer | Hal Finkel <hfinkel@anl.gov> | 2013-07-02 05:21:11 +0000 |
| commit | fdbe161b1a114ccdd35b70374d0e484890aa2fae (patch) | |
| tree | 1064cca725ad9d3bc2b2b5f120eccdcc91562868 /llvm/lib/Object/Archive.cpp | |
| parent | 26fcc51f153f0f5a3e24030f0216165a5ac2ffc8 (diff) | |
| download | bcm5719-llvm-fdbe161b1a114ccdd35b70374d0e484890aa2fae.tar.gz bcm5719-llvm-fdbe161b1a114ccdd35b70374d0e484890aa2fae.zip | |
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
Diffstat (limited to 'llvm/lib/Object/Archive.cpp')
0 files changed, 0 insertions, 0 deletions

