[PATCH] D53629: [GlobalISel] Restrict G_MERGE_VALUES capability and replace with new opcodes

Volkan Keles via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 26 14:53:35 PST 2018


volkan added inline comments.


================
Comment at: include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h:155
+
+    unsigned MergingOpcode;
+    if (MRI.getType(MI.getOperand(NumDefs).getReg()).isVector())
----------------
Could you handle G_BUILD_VECTOR as well? We are unable to legalize the test below because of the missing combine.

```
---
name:            test_unmerge
body:             |
  bb.1:
    liveins: $w0
    %0:_(s32) = COPY $w0
    %1:_(<2 x s32>) = G_BUILD_VECTOR %0(s32), %0(s32)
    %2:_(s32), %3:_(s32) = G_UNMERGE_VALUES %1(<2 x s32>)
    $w0 = COPY %2(s32)
...
```


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D53629/new/

https://reviews.llvm.org/D53629





More information about the llvm-commits mailing list