This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Canonicalization of compares performed as side-effect operations


On 14/08/2019 08:48, Eric Botcazou wrote:
[Sorry for the delay, I missed your question...]

Interesting.  Does it work for the general case of a reverse subtract,
which I need to handle as wel?

Not clear, Visium only uses it for SNE and combined NEG/SNE.


I worked through the logic. I'm pretty sure it will work for any unsigned or equality comparison and for any constant. The general transformation is

(cst uns/eq/op reg) == (~reg uns/eq/op ~cst)

R.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]