Ahmed Bougacha
a689d2cb58
[IR] fptrunc-of-fptrunc isn't an EliminableCastPair.
...
Double and single rounding can produce different results.
This is the IR counterpart to r228911.
llvm-svn: 238531
2015-05-29 00:04:30 +00:00
Steven Wu
896d3dd47b
Fix another infinite loop in InstCombine
...
Summary:
InstCombine infinite-loops for the testcase added
It is because InstCombine is generating instructions that can be
optimized by itself. Fix by not optimizing frem if the optimized
type is the same as original type.
rdar://problem/19150820
Reviewers: majnemer
Differential Revision: http://reviews.llvm.org/D6634
llvm-svn: 224097
2014-12-12 04:34:07 +00:00
David Majnemer
e6cc1061cc
InstCombine: Fix another infinite loop caused by visitFPTrunc
...
We would attempt to replace an frem's operand with the same operand.
This would cause InstCombine to think real work was done, causing
InstCombine to enter an infinite loop.
This fixes the second part of PR21576.
llvm-svn: 222265
2014-11-18 22:06:45 +00:00
David Majnemer
0c67e78132
Revert "Revert r222040 because of bot failure."
...
This reverts commit r222203, reverting r222040 didn't end up turning the
bot green.
llvm-svn: 222261
2014-11-18 21:30:02 +00:00
Manman Ren
3d4f707d60
Revert r222040 because of bot failure.
...
http://lab.llvm.org:8080/green/job/clang-Rlto_master/298/
Hopefully, bot will be green.
llvm-svn: 222203
2014-11-18 00:33:22 +00:00
David Majnemer
4c69b4d32f
InstCombine: Fix infinite loop caused by visitFPTrunc
...
We would attempt to replace a fptrunc of an frem with an identical
fptrunc. This would cause the new fptrunc to be added to the worklist.
Of course, this results in an infinite loop because we will keep
visiting the newly created fptruncs.
This fixes PR21576.
llvm-svn: 222040
2014-11-14 21:21:15 +00:00
Owen Anderson
8750294bae
Fix more instances of dropped fast math flags when optimizing FADD instructions. All found by inspection (aka grep).
...
llvm-svn: 199528
2014-01-18 00:48:14 +00:00
Owen Anderson
5e2eba8c18
Pull fptrunc's upwards through selects when one of the select's selectands was a constant. This has a number of benefits, including producing small immediates (easier to materialize, smaller constant pools) as well as being more likely to allow the fptrunc to fuse with a preceding instruction (truncating selects are unusual).
...
llvm-svn: 191929
2013-10-03 21:08:05 +00:00
Owen Anderson
9e81fe53cf
Teach InstCombine to hoist FABS and FNEG through FPTRUNC instructions. The application of these operations commutes with the truncation, so we should prefer to do them in the smallest size we can, to save register space, use smaller constant pool entries, etc.
...
llvm-svn: 172117
2013-01-10 22:06:52 +00:00
Edward O'Callaghan
4d633eaaae
Convert the rest of the InstCombine tests from notcast to FileCheck.
...
llvm-svn: 83828
2009-10-12 07:18:14 +00:00
Dan Gohman
142428ce64
Eliminate more uses of llvm-as and llvm-dis.
...
llvm-svn: 81293
2009-09-09 00:09:15 +00:00
Dan Gohman
c95df8b6d8
Use opt -S instead of piping bitcode output through llvm-dis.
...
llvm-svn: 81257
2009-09-08 22:34:10 +00:00
Tanya Lattner
9aa573954c
Remove llvm-upgrade and update tests.
...
llvm-svn: 48103
2008-03-09 08:16:40 +00:00
Reid Spencer
c3793d33d1
This test needs to use egrep.
...
llvm-svn: 36012
2007-04-14 20:02:51 +00:00
Reid Spencer
4572ce85b0
Regression is gone, don't try to find it on clean target.
...
llvm-svn: 33296
2007-01-17 07:59:14 +00:00