diff options
author | Sanjay Patel <spatel@rotateright.com> | 2018-05-20 14:23:23 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2018-05-20 14:23:23 +0000 |
commit | a003c728a52a77cf585453313b601edaf5a19225 (patch) | |
tree | 57287e5cd90f1ea3e89c7d969576c988d52df7dd /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 4a227e582b2f13880ea049b29988a37a0f7c0742 (diff) | |
download | bcm5719-llvm-a003c728a52a77cf585453313b601edaf5a19225.tar.gz bcm5719-llvm-a003c728a52a77cf585453313b601edaf5a19225.zip |
[InstCombine] choose 1 form of abs and nabs as canonical
We already do this for min/max (see the blob above the diff),
so we should do the same for abs/nabs.
A sign-bit check (<s 0) is used as a predicate for other IR
transforms and it's likely the best for codegen.
This might solve the motivating cases for D47037 and D47041,
but I think those patches still make sense. We can't guarantee
this canonicalization if the icmp has more than one use.
Differential Revision: https://reviews.llvm.org/D47076
llvm-svn: 332819
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions