[llvm-bugs] [Bug 27356] New: [ppc] missed chance to use rlwnm
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Apr 14 13:45:10 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=27356
Bug ID: 27356
Summary: [ppc] missed chance to use rlwnm
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Backend: PowerPC
Assignee: unassignedbugs at nondot.org
Reporter: spatel+llvm at rotateright.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
This example came up in http://reviews.llvm.org/D19087 :
define i1 @and_cmp_variable_power_of_two(i32 %x, i32 %y) {
%shl = shl i32 1, %y
%and = and i32 %x, %shl
%cmp = icmp eq i32 %and, %shl
ret i1 %cmp
}
$ llc -o - andn.ll -mtriple=powerpc64-apple-darwin
_ li r2, 1
slw r2, r2, r4
and r2, r3, r2
cntlzw r2, r2
nor r2, r2, r2
rlwinm r3, r2, 27, 31, 31
blr
Double-check to make sure because my PPC is beyond rusty, but I think this is:
subfic r4, r4, 32
rlwnm r3, r3, r4, 31, 31
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160414/9059278a/attachment.html>
More information about the llvm-bugs
mailing list