aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2020-07-03 15:51:06 +0100
committerSimon Pilgrim <llvm-dev@redking.me.uk>2020-07-03 16:02:10 +0100
commiteb0e7acbd4853c31a1401c8f02586850fee15107 (patch)
treee586843214a6ead8ed274250e1c8705a034fa440 /clang/lib/Frontend/CompilerInstance.cpp
parent53422e8b4f65a6736896311b10ad8a22fbc9e372 (diff)
downloadllvm-eb0e7acbd4853c31a1401c8f02586850fee15107.zip
llvm-eb0e7acbd4853c31a1401c8f02586850fee15107.tar.gz
llvm-eb0e7acbd4853c31a1401c8f02586850fee15107.tar.bz2
[InstCombine] canEvaluateTruncated - use KnownBits to check for inrange shift amounts
Currently canEvaluateTruncated can only attempt to truncate shifts if they are scalar/uniform constant amounts that are in range. This patch replaces the constant extraction code with KnownBits handling, using the KnownBits::getMaxValue to check that the amounts are inrange. This enables support for nonuniform constant cases, and also variable shift amounts that have been masked somehow. Annoyingly, this still won't work for vectors with (demanded) undefs as KnownBits returns nothing in those cases, but its a definite improvement on what we currently have. Differential Revision: https://reviews.llvm.org/D83127
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
0 files changed, 0 insertions, 0 deletions