This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Transform fixable instruction in place in RISCVSExtWRemoval. NFC
ClosedPublic

Authored by craig.topper on Nov 14 2022, 11:06 AM.

Details

Summary

Instead of creating a new instruction and copying operands, we can
use setDesc to convert in place.

Diff Detail

Event Timeline

craig.topper created this revision.Nov 14 2022, 11:06 AM
craig.topper requested review of this revision.Nov 14 2022, 11:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 14 2022, 11:06 AM

I'm not sure this is right. The problem is that the original instruction can have flags that indicate e.g. no-wrap or no-inf. Previously, those were implicitly dropped. After the transform, we have a different instruction semantic, are you sure those flags are always preserved? That seems like a non-obvious claim.

Clear the poison generating flags

reames accepted this revision.Nov 21 2022, 10:53 AM

Under the assumption that only integer operations can reach this bit of code, LGTM

This revision is now accepted and ready to land.Nov 21 2022, 10:53 AM