[PATCH] D42012: [GlobalISel][TableGen] Add support for SDNodeXForm

Volkan Keles via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 12 17:05:00 PST 2018


volkan marked an inline comment as done.
volkan added inline comments.


================
Comment at: test/CodeGen/AArch64/GlobalISel/select-mul.mir:21
+    ; CHECK: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 3
+    ; CHECK: [[SMADDLrrr:%[0-9]+]]:gpr64 = SMADDLrrr [[COPY]], [[MOVi32imm]], %xzr
+    ; CHECK: %x0 = COPY [[SMADDLrrr]]
----------------
qcolombet wrote:
> I'm confused, isn't the goal of the patch to be able to match the immediate variant here?
Yes, but the pattern it's trying to match is different.
```
def : Pat<(i64 (mul (sext GPR32:$Rn), (s64imm_32bit:$C))),
          (SMADDLrrr GPR32:$Rn, (MOVi32imm (trunc_imm imm:$C)), XZR)>;
```
Here, `trunc_imm` is an SDNodeXForm.

I'll add the pattern as a comment.


https://reviews.llvm.org/D42012





More information about the llvm-commits mailing list