This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Don't print a tab after mnemonics that don't have operands.
ClosedPublic

Authored by craig.topper on Jul 24 2023, 8:49 PM.

Diff Detail

Event Timeline

craig.topper created this revision.Jul 24 2023, 8:49 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 24 2023, 8:49 PM
craig.topper requested review of this revision.Jul 24 2023, 8:49 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 24 2023, 8:49 PM
Herald added a subscriber: eopXD. · View Herald Transcript
wangpc accepted this revision.Jul 24 2023, 9:42 PM

LGTM

This revision is now accepted and ready to land.Jul 24 2023, 9:42 PM
jrtc27 added inline comments.Jul 24 2023, 10:10 PM
llvm/lib/Target/RISCV/RISCVInstrFormats.td
165

Surely that's backwards? Anyway, if this works it's shorter and feels more natural to me.

jrtc27 added inline comments.Jul 24 2023, 10:25 PM
llvm/lib/Target/RISCV/RISCVInstrFormats.td
165

Oh, right, !empty is the function, not a negated empty... not confusing at all. Then flip it for:

let AsmString = opcodestr # !if(!empty(argstr), "", "\t" # argstr);

?

asb accepted this revision.Jul 24 2023, 10:55 PM

LGTM.

This revision was landed with ongoing or failed builds.Jul 25 2023, 12:10 AM
This revision was automatically updated to reflect the committed changes.