aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/CommandLineTest.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2022-03-09 13:12:43 -0500
committerSanjay Patel <spatel@rotateright.com>2022-03-09 13:19:00 -0500
commit341623653d891386b7943445981565ed1dff2a18 (patch)
tree31d39ffb58eb648094dadd030858bd9aecbc2679 /llvm/unittests/Support/CommandLineTest.cpp
parent0f20a35b9e4bf4fdc4fb5ff2b5f9beee48081e9c (diff)
downloadllvm-341623653d891386b7943445981565ed1dff2a18.zip
llvm-341623653d891386b7943445981565ed1dff2a18.tar.gz
llvm-341623653d891386b7943445981565ed1dff2a18.tar.bz2
[SDAG] match rotate pattern with extra 'or' operation
This is another fold generalized from D111530. We can find a common source for a rotate operation hidden inside an 'or': https://alive2.llvm.org/ce/z/9pV8hn Deciding when this is profitable vs. a funnel-shift is tricky, but this does not show any regressions: if a target has a rotate but it does not have a funnel-shift, then try to form the rotate here. That is why we don't have x86 test diffs for the scalar tests that are duplicated from AArch64 ( 74a65e3834d9487 ) - shld/shrd are available. That also makes it difficult to show vector diffs - the only case where I found a diff was on x86 AVX512 or XOP with i64 elements. There's an additional check for a legal type to avoid a problem seen with x86-32 where we form a 64-bit rotate but then it gets split inefficiently. We might avoid that by adding more rotate folds, but I didn't check to see what is missing on that path. This gets most of the motivating patterns for AArch64 / ARM that are in D111530. We still need a couple of enhancements to setcc pattern matching with rotate/funnel-shift to get the rest. Differential Revision: https://reviews.llvm.org/D120933
Diffstat (limited to 'llvm/unittests/Support/CommandLineTest.cpp')
0 files changed, 0 insertions, 0 deletions