llvm-project/llvm/test/CodeGen/M68k
Douglas Chen 78b16ccf2b [M68k] Instruction selection to choose neg x when mul x -1 (Fix issue 48588)
This patch is trying to fix issue 48588(https://github.com/llvm/llvm-project/issues/48588)

I found the results of Instruction Selection between SelectionDAG and FastISEL for the `%mul = mul i32 %A, 4294967295`:
(seldag-isel) mul --> sub --> SUB32dp
(fast-isel)   mul --> sub --> NEG32d

My patch to fix this issue is by overriding a virtual function M68kDAGToDAGISel::IsProfitableToFold(). Return `false` when it was trying to match with SUB, then it will match with NEG.

Reviewed By: myhsu

Differential Revision: https://reviews.llvm.org/D116886
2022-06-03 13:20:30 +08:00
..
Alloc [M68k] Separate ADDA from ADD and migrate rest of the arithmetic MC tests 2021-08-07 17:19:12 -07:00
Arith [M68k] Instruction selection to choose neg x when mul x -1 (Fix issue 48588) 2022-06-03 13:20:30 +08:00
CConv [M68k] Separate ADDA from ADD and migrate rest of the arithmetic MC tests 2021-08-07 17:19:12 -07:00
CodeModel [M68k] Adopt VarLenCodeEmitter for move instructions 2022-04-04 23:02:27 -07:00
Control [M68k] Regenerate cmp.ll tests 2022-04-21 16:54:00 +01:00
GlobalISel [GlobalISel] Add big endian support in CallLowering 2022-02-08 14:43:38 +00:00
ShiftRotate [M68k] Add testcases for shift and rotate instructions 2021-06-23 13:26:58 +08:00
CollapseMOVEM.mir [M68k][AsmParser] Support parsing register masks & fix printing them 2021-08-24 10:40:02 +01:00
inline-asm.ll [M68k] Separate ADDA from ADD and migrate rest of the arithmetic MC tests 2021-08-07 17:19:12 -07:00
is-pcrel-register-operand-legal.mir [TableGen] Remove code beads 2022-05-30 14:27:37 +08:00
lit.local.cfg
reserved-regs.ll [M68k] Allow user to preserve certain registers 2021-05-20 13:57:22 -07:00
varargs.ll [M68k][test] Remove redundant CHECK-LABEL directive 2022-04-03 22:51:03 -07:00