This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][GlobalISel] Use ZExtValue for zext(xor) when invert tb(n)z
ClosedPublic

Authored by guopeilin on Aug 26 2021, 3:57 AM.

Details

Summary

Currently, we use SExtValue to decide whether to invert tbz or tbnz.
However, for the case zext (xor x, c), we should use ZExt rather
than SExt otherwise we will generate totally opposite branches.

Diff Detail

Event Timeline

guopeilin created this revision.Aug 26 2021, 3:57 AM
guopeilin requested review of this revision.Aug 26 2021, 3:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 26 2021, 3:57 AM
This revision is now accepted and ready to land.Aug 31 2021, 10:34 AM

LGTM

Thanks for reviewing.

This fixed https://bugs.llvm.org/show_bug.cgi?id=51505, not sure if you were aware of it. Thanks either way!

dewen added a subscriber: dewen.Apr 11 2022, 4:24 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 11 2022, 4:24 AM
dewen removed a subscriber: dewen.Apr 11 2022, 4:24 AM