diff options
| author | Sanjay Patel <spatel@rotateright.com> | 2017-11-19 15:34:27 +0000 |
|---|---|---|
| committer | Sanjay Patel <spatel@rotateright.com> | 2017-11-19 15:34:27 +0000 |
| commit | eb731b09f3cbea16487d1abc63029d5fa2d899b2 (patch) | |
| tree | 726b0ff4495a502662e7ec77d2c27db93cee5ed5 /polly/lib/CodeGen/PPCGCodeGeneration.cpp | |
| parent | d7ff94f0357b6c16e39ac39d0e336a2280d0d05b (diff) | |
| download | bcm5719-llvm-eb731b09f3cbea16487d1abc63029d5fa2d899b2.tar.gz bcm5719-llvm-eb731b09f3cbea16487d1abc63029d5fa2d899b2.zip | |
[InstSimplify] fold and/or of fcmp ord/uno when operand is known nnan
The 'ord' and 'uno' predicates have a logic operation for NAN built into their definitions:
FCMP_ORD = 7, ///< 0 1 1 1 True if ordered (no nans)
FCMP_UNO = 8, ///< 1 0 0 0 True if unordered: isnan(X) | isnan(Y)
So we can simplify patterns like this:
(fcmp ord (known NNAN), X) && (fcmp ord X, Y) --> fcmp ord X, Y
(fcmp uno (known NNAN), X) || (fcmp uno X, Y) --> fcmp uno X, Y
It might be better to split this into (X uno 0) | (Y uno 0) as a canonicalization, but that
would be another patch.
Differential Revision: https://reviews.llvm.org/D40130
llvm-svn: 318627
Diffstat (limited to 'polly/lib/CodeGen/PPCGCodeGeneration.cpp')
0 files changed, 0 insertions, 0 deletions

