[llvm-bugs] [Bug 37793] New: Does SCEV have any problems with recognizing shl+shr/shr+shl pairs turned into masks?
llvm-bugs at lists.llvm.org
Wed Jun 13 12:11:03 PDT 2018
Bug ID: 37793
Summary: Does SCEV have any problems with recognizing
shl+shr/shr+shl pairs turned into masks?
Component: Global Analyses
Assignee: unassignedbugs at nondot.org
Reporter: lebedev.ri at gmail.com
CC: llvm-bugs at lists.llvm.org
I'm not sure this is a bug, more like a question.
In https://reviews.llvm.org/D46760#1123713, Sanjay Patel suggests transforming
lshr+shl into mask(and)+shl, which is not only a canonicalization, but
would also sidestep the problem which D46760 is trying to fix.
This canonicalization is already being done for the non-constants,
or equal constants, but not unequal constants.
The commit that introduced that restriction: https://reviews.llvm.org/rL155136
suggests that said transform negatively impacts backend (rotate instruction),
The backend part will likely be resolved in https://reviews.llvm.org/D47681 or
But the state of SCEV is unknown.
Does it actually have a problem with the mask+shift,
or that comment is no longer correct?
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-bugs