[llvm-bugs] [Bug 41057] New: [X86] __builtin_rotateright* does not use rotate by 1 instructions or rorx with bmi
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Mar 13 13:36:01 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=41057
Bug ID: 41057
Summary: [X86] __builtin_rotateright* does not use rotate by 1
instructions or rorx with bmi
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: X86
Assignee: unassignedbugs at nondot.org
Reporter: craig.topper at gmail.com
CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
llvm-dev at redking.me.uk, spatel+llvm at rotateright.com
The isel patterns for rotates by immediates are written assuming rotate by
immediate will always use a rotl operation because that's what the pattern
matching code from the shift+or pattern will do.
But the __builtin_rotateright* functions use the funnel shift intrinsics and
will be turned directly into rotr by SelectionDAGBuilder. This will miss most
of the patterns except the ror by immediate patterns.
Godbolt example showing both issues https://godbolt.org/z/7Tt1ki
--
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/20190313/2bc0aeef/attachment.html>
More information about the llvm-bugs
mailing list