[PATCH] D76201: [TargetLowering] Only demand a rotation's modulo amount bits
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 15 12:51:24 PDT 2020
RKSimon created this revision.
RKSimon added reviewers: dylanmckay, aykevl, rsandifo, uweigand, hfinkel, craig.topper.
Herald added subscribers: Jim, hiraditya, nemanjai.
Herald added a project: LLVM.
RKSimon marked 2 inline comments as done.
RKSimon added inline comments.
Herald added a subscriber: wuzish.
================
Comment at: llvm/test/CodeGen/SystemZ/rot-01.ll:30
; CHECK-NEXT: br %r14
%mod = urem i64 %amt, 32
----------------
@uweigand Should this be 32 or 64?
================
Comment at: llvm/test/CodeGen/SystemZ/rot-02.ll:7
; Test that AND is not removed when some lower 6 bits are not set.
define i32 @f1(i32 %val, i32 %amt) {
----------------
@uweigand This comment doesn't seem to match the test - any suggestions?
ISD::ROTL/ROTR rotation values are guaranteed to act as a modulo amount, so for power-of-2 bitwidths we only need the lowest bits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D76201
Files:
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/test/CodeGen/AArch64/funnel-shift-rot.ll
llvm/test/CodeGen/AVR/rot.ll
llvm/test/CodeGen/PowerPC/rotl-2.ll
llvm/test/CodeGen/SystemZ/rot-01.ll
llvm/test/CodeGen/SystemZ/rot-02.ll
llvm/test/CodeGen/SystemZ/shift-04.ll
llvm/test/CodeGen/SystemZ/shift-08.ll
llvm/test/CodeGen/Thumb2/thumb2-ror.ll
llvm/test/CodeGen/X86/combine-rotates.ll
llvm/test/CodeGen/X86/vector-fshl-rot-512.ll
llvm/test/CodeGen/X86/vector-fshr-rot-512.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76201.250437.patch
Type: text/x-patch
Size: 22825 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200315/ecad0f6e/attachment.bin>
More information about the llvm-commits
mailing list