[M68k] Separate ADDA from ADD and migrate rest of the arithmetic MC tests
authorMin-Yih Hsu <minyihh@uci.edu>
Sat, 7 Aug 2021 23:37:35 +0000 (16:37 -0700)
committerMin-Yih Hsu <minyihh@uci.edu>
Sun, 8 Aug 2021 00:19:12 +0000 (17:19 -0700)
commit657bb7262d4a53e903e702d46fdcab57b7085128
tree02279672c88ead16ed673eb9f330c4f06fb94ba9
parent4c0d15f86f33dc61ec1dc618fb164c127409edfc
[M68k] Separate ADDA from ADD and migrate rest of the arithmetic MC tests

Previously ADD & ADDA (as well as SUB & SUBA) instructions are mixed
together, which not only violated Motorola assembly's syntax but also
made asm parsing more difficult. This patch separates these two kinds of
instructions migrate rest of the tests from
test/CodeGen/M68k/Encoding/Arithmetic to test/MC/M68k/Arithmetic.

Note that we observed minor regressions on codegen quality: Sometimes
isel uses ADD instead of ADDA even the latter can lead to shorter
sequence of code. This issue implies that some isel patterns might need
to be updated.
45 files changed:
llvm/lib/Target/M68k/AsmParser/M68kAsmParser.cpp
llvm/lib/Target/M68k/M68kFrameLowering.cpp
llvm/lib/Target/M68k/M68kInstrArithmetic.td
llvm/lib/Target/M68k/M68kInstrCompiler.td
llvm/lib/Target/M68k/M68kInstrFormats.td
llvm/lib/Target/M68k/M68kInstrInfo.h
llvm/lib/Target/M68k/M68kInstrInfo.td
llvm/test/CodeGen/M68k/Alloc/dyn_alloca_aligned.ll
llvm/test/CodeGen/M68k/Arith/add.ll
llvm/test/CodeGen/M68k/Arith/divide-by-constant.ll
llvm/test/CodeGen/M68k/Arith/imul.ll
llvm/test/CodeGen/M68k/Arith/mul64.ll
llvm/test/CodeGen/M68k/Arith/sdiv-exact.ll
llvm/test/CodeGen/M68k/Arith/smul-with-overflow.ll
llvm/test/CodeGen/M68k/Arith/sub-with-overflow.ll
llvm/test/CodeGen/M68k/Arith/umul-with-overflow.ll
llvm/test/CodeGen/M68k/CConv/c-call.ll
llvm/test/CodeGen/M68k/CConv/fastcc-call.ll
llvm/test/CodeGen/M68k/CodeModel/medium-pic.ll
llvm/test/CodeGen/M68k/CodeModel/medium-pie-global-access.ll
llvm/test/CodeGen/M68k/CodeModel/medium-pie.ll
llvm/test/CodeGen/M68k/CodeModel/medium-static.ll
llvm/test/CodeGen/M68k/CodeModel/small-pic.ll
llvm/test/CodeGen/M68k/CodeModel/small-pie-global-access.ll
llvm/test/CodeGen/M68k/CodeModel/small-pie.ll
llvm/test/CodeGen/M68k/CodeModel/small-static.ll
llvm/test/CodeGen/M68k/Control/cmp.ll
llvm/test/CodeGen/M68k/Control/setcc.ll
llvm/test/CodeGen/M68k/Encoding/Arith/Classes/MxBiArOp_RFRI_xEA.mir [deleted file]
llvm/test/CodeGen/M68k/Encoding/Arith/Classes/MxBiArOp_RFRM.mir [deleted file]
llvm/test/CodeGen/M68k/Encoding/Arith/Classes/MxBiArOp_RFRR_xEA.mir [deleted file]
llvm/test/CodeGen/M68k/Encoding/Arith/Classes/MxCMP_BI.mir [deleted file]
llvm/test/CodeGen/M68k/Encoding/Arith/Classes/MxCMP_MI.mir [deleted file]
llvm/test/CodeGen/M68k/Encoding/Arith/Classes/MxCMP_RM.mir [deleted file]
llvm/test/CodeGen/M68k/Encoding/Control/branch-pc-rel.mir
llvm/test/CodeGen/M68k/Encoding/Relaxations/branch.mir
llvm/test/CodeGen/M68k/inline-asm.ll
llvm/test/CodeGen/M68k/varargs.ll
llvm/test/MC/M68k/Arith/Classes/MxBiArOp_RFRI_xEA.s [new file with mode: 0644]
llvm/test/MC/M68k/Arith/Classes/MxBiArOp_RFRM.s [new file with mode: 0644]
llvm/test/MC/M68k/Arith/Classes/MxBiArOp_RFRR_xEA.s [new file with mode: 0644]
llvm/test/MC/M68k/Arith/Classes/MxCMP_BI.s [new file with mode: 0644]
llvm/test/MC/M68k/Arith/Classes/MxCMP_MI.s [new file with mode: 0644]
llvm/test/MC/M68k/Arith/Classes/MxCMP_RM.s [new file with mode: 0644]
llvm/test/MC/M68k/instructions.s