This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Avoid unnecessary XOR for seteq/setne 0
ClosedPublic

Authored by jrtc27 on Oct 22 2018, 6:04 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

jrtc27 created this revision.Oct 22 2018, 6:04 AM
jrtc27 added a reviewer: asb.Oct 22 2018, 6:05 AM
asb added a comment.Nov 7 2018, 9:03 AM

Great catch, thanks. I know there's good test coverage for by virtue of it being a common pattern, but could you please add a more targeted unit test to e.g. test/CodeGen/RISCV/i32-icmp.ll? Otherwise, looks good to me.

jrtc27 updated this revision to Diff 173190.Nov 8 2018, 10:20 AM

Added explicit test cases to test/CodeGen/RISCV/i32-icmp.ll.

asb accepted this revision.Nov 9 2018, 6:46 AM

Looks good to me, thanks!

This revision is now accepted and ready to land.Nov 9 2018, 6:46 AM
This revision was automatically updated to reflect the committed changes.