aboutsummaryrefslogtreecommitdiff
path: root/clang/tools/include-mapping/cppreference_parser.py
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2023-01-11 11:58:00 +0100
committerNikita Popov <npopov@redhat.com>2023-01-12 16:41:31 +0100
commit4f772b095525059521f2f88112d29dcfaa178101 (patch)
tree9cbfb3c319920d0e38f7d6ebf8f3eb285128f4ce /clang/tools/include-mapping/cppreference_parser.py
parent0d674cf0eae84a7b83999d2122c1609a8ee2b16d (diff)
downloadllvm-4f772b095525059521f2f88112d29dcfaa178101.zip
llvm-4f772b095525059521f2f88112d29dcfaa178101.tar.gz
llvm-4f772b095525059521f2f88112d29dcfaa178101.tar.bz2
[LVI][CVP] Make use of condition known at use
When an instruction is only used in a select or phi operand, we might be able to make use of additional information from the select/branch condition. For example in %sub = call i16 @llvm.usub.sat.i16(i16 %x, i16 10) %cmp = icmp uge i16 %x, 10 %sel = select i1 %cmp, i16 %sub, i16 42 the usub.sat is only used in a select where %x uge 10 is known to hold, so we can fold it based on that knowledge. This addresses the regression reported at https://reviews.llvm.org/D140798#4039748, but also provides a solution to a recurring problem we've had, where we fail to make use of range information after a branch+phi has been converted into a select. Our current solution to this is to hope that IPSCCP can perform the fold before that happens, but handling this in LVI is a somewhat more general solution. Currently we only make use of this for the willNotOverflow() fold, but I plan to adjust other folds to use the new API as well. Differential Revision: https://reviews.llvm.org/D141482
Diffstat (limited to 'clang/tools/include-mapping/cppreference_parser.py')
0 files changed, 0 insertions, 0 deletions