aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2020-10-19 12:03:04 -0700
committerCraig Topper <craig.topper@gmail.com>2020-10-19 12:56:59 -0700
commitedd0cb11bd182de8d70b7bbeba73f88d7a3714db (patch)
tree4fb4107c049c81484e2fd92ee1995d953ba4dfa2 /clang/lib/Frontend/CompilerInvocation.cpp
parente28376ec28b9034a35e01c95ccb4de9ccc6c4954 (diff)
downloadllvm-edd0cb11bd182de8d70b7bbeba73f88d7a3714db.zip
llvm-edd0cb11bd182de8d70b7bbeba73f88d7a3714db.tar.gz
llvm-edd0cb11bd182de8d70b7bbeba73f88d7a3714db.tar.bz2
[SelectionDAG][X86] Enable SimplifySetCC CTPOP transforms for vector splats
This enables these transforms for vectors: (ctpop x) u< 2 -> (x & x-1) == 0 (ctpop x) u> 1 -> (x & x-1) != 0 (ctpop x) == 1 --> (x != 0) && ((x & x-1) == 0) (ctpop x) != 1 --> (x == 0) || ((x & x-1) != 0) All enabled if CTPOP isn't Legal. This differs from the scalar behavior where the first two are done unconditionally and the last two are done if CTPOP isn't Legal or Custom. The Legal check produced better results for vectors based on X86's custom handling. Might be worth re-visiting scalars here. I disabled the looking through truncate for vectors. The code that creates new setcc can use the same result VT as the original setcc even if we truncated the input. That may work work for most scalars, but definitely wouldn't work for vectors unless it was a vector of i1. Fixes or at least improves PR47825 Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D89346
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions