[PATCH] D41728: [TableGen][AsmMatcherEmitter] Remove boolean 'Hack' parameter
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 10 06:28:53 PST 2018
fhahn requested changes to this revision.
fhahn added a comment.
This revision now requires changes to proceed.
I do not think just removing the error message for the hack is the right thing to do.
With this patch, it is possible to define instruction aliases like (AArch64 example)
`def : InstAlias<"mov $dst, $src, $src, $src", (ORRWrs GPR32:$dst, WZR, GPR32:$src, 0), 2>;`
And now
bar:
mov w1, w0, w2, w3
mov w1, w0, w0, w0
gets encoded to the following by llvm-mc:
bar:
orr w1, wzr, w0 // encoding: [0xe1,0x03,0x00,0x2a]
orr w1, wzr, w0 // encoding: [0xe1,0x03,0x00,0x2a]
If we want to support instruction aliases with tied operands, it seems like we have to add tied constraints for strings with repeated operands automatically or provide a way to specify the alias as "mov $dst, $src1, $src2, $src3" with "$src1 = $src2 = $src3"
https://reviews.llvm.org/D41728
More information about the llvm-commits
mailing list