diff options
| author | Jean Perier <jperier@nvidia.com> | 2020-06-18 07:46:19 +0200 |
|---|---|---|
| committer | Jean Perier <jperier@nvidia.com> | 2020-06-18 08:14:58 +0200 |
| commit | f1fa3b7f6ee958ec4dfb7104bd0ae64ec0061551 (patch) | |
| tree | 25880b2730fa2527e530f501f3bbd6a579e9db7e /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | |
| parent | f7455da2633d14f1ce76aaa7c73ea682ac51ac37 (diff) | |
| download | llvm-f1fa3b7f6ee958ec4dfb7104bd0ae64ec0061551.zip llvm-f1fa3b7f6ee958ec4dfb7104bd0ae64ec0061551.tar.gz llvm-f1fa3b7f6ee958ec4dfb7104bd0ae64ec0061551.tar.bz2 | |
[flang] AMAX0, MIN1... rewrite to MAX/MIN: make result conversion explicit
Summary:
This patch changes speficic extremum functions rewrite to generic MIN/MAX.
It applies to AMAX0, AMIN0, AMAX1, AMIN1, MAX0, MIN0, MAX1, MIN1, DMAX1,
and DMIN1.
- Do not re-write specific extremums to MAX/MIN in intrinsic Probe and let
folding rewrite it and introduc the conversion on the MIN/MAX result.
- Also make operand promotion explicit in MIN/MAX folding.
For instance, after this patch:
AMAX0(int8, int4) is rewritten to REAL(MAX(int8, INT(int4, 8)))
All this care is to avoid rewritting it to MAX(REAL(int8), REAL(int4))
that may not always be numerically equivalent to the first rewrite.
Reviewers: klausler, schweitz, sscalpone, jdoerfert, DavidTruby
Reviewed By: klausler, schweitz
Subscribers: llvm-commits, flang-commits
Tags: #flang, #llvm
Differential Revision: https://reviews.llvm.org/D81940
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
0 files changed, 0 insertions, 0 deletions
