[all-commits] [llvm/llvm-project] 9fb946: [InstCombine] add tests for rotate/funnel; NFC
RotateRight via All-commits
all-commits at lists.llvm.org
Wed Apr 28 13:50:13 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9fb946f1a8dd99ff5a77748114889422f57967b8
https://github.com/llvm/llvm-project/commit/9fb946f1a8dd99ff5a77748114889422f57967b8
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2021-04-28 (Wed, 28 Apr 2021)
Changed paths:
M llvm/test/Transforms/InstCombine/funnel.ll
M llvm/test/Transforms/InstCombine/rotate.ll
Log Message:
-----------
[InstCombine] add tests for rotate/funnel; NFC
Commit: abd7529625a73f405e40a63dcc446c41d51a219e
https://github.com/llvm/llvm-project/commit/abd7529625a73f405e40a63dcc446c41d51a219e
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2021-04-28 (Wed, 28 Apr 2021)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
M llvm/test/Transforms/InstCombine/funnel.ll
M llvm/test/Transforms/InstCombine/rotate.ll
Log Message:
-----------
[InstCombine] relax masking requirement for truncated funnel/rotate match
I was investigating a seemingly unrelated improvement in demanded
bits for shift-left, but that caused regressions on these tests
because we were able to look through/eliminate the mask.
https://alive2.llvm.org/ce/z/Ztdr22
define i8 @src(i32 %x, i32 %y, i32 %shift) {
%and = and i32 %shift, 3
%conv = and i32 %x, 255
%shr = lshr i32 %conv, %and
%sub = sub i32 8, %and
%shl = shl i32 %y, %sub
%or = or i32 %shr, %shl
%conv2 = trunc i32 %or to i8
ret i8 %conv2
}
define i8 @tgt(i32 %x, i32 %y, i32 %shift) {
%x8 = trunc i32 %x to i8
%y8 = trunc i32 %y to i8
%shift8 = trunc i32 %shift to i8
%and = and i8 %shift8, 3
%conv2 = call i8 @llvm.fshr.i8(i8 %y8, i8 %x8, i8 %and)
ret i8 %conv2
}
declare i8 @llvm.fshr.i8(i8,i8,i8)
Compare: https://github.com/llvm/llvm-project/compare/4d41810cf679...abd7529625a7
More information about the All-commits
mailing list