[PATCH] D144154: [X86]Use Class to refactor ArithMetic td file in X86
Kan Shengchen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 17 03:54:00 PST 2023
skan added inline comments.
================
Comment at: llvm/lib/Target/X86/X86InstrArithmetic.td:804-812
+def Xi16x : X86TypeInfo<i16, "w", GR16, loadi16, i16mem,
+ Imm16, i16imm, imm, i16i8imm, i16immSExt8,
+ 1, OpSize16, 0>;
+def Xi32x : X86TypeInfo<i32, "l", GR32, loadi32, i32mem,
+ Imm32, i32imm, imm, i32i8imm, i32immSExt8,
+ 1, OpSize32, 0>;
+def Xi64x : X86TypeInfo<i64, "q", GR64, loadi64, i64mem,
----------------
The only difference between Xi64x and Xi64 is the "small use of immediate", which is defined in X86InstrInfo.td. e,g `imm_su` <-> `imm`
`imm_su` is not used here b/c IMUL are not binary operations.
so the suffix x here is not appropriate.
I would suggest you add one field `SDPatternOperator ImmNoSuOperator` in `X86TypeInfo` and use `Xi16`, `Xi32`, `Xi64` for IMUL too.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144154/new/
https://reviews.llvm.org/D144154
More information about the llvm-commits
mailing list