[AMDGPU][GlobalISel] Add RegBankLegalize support for G_PTRMASK (#174889)
Add support for G_PTRMASK but we are missing p8 (buffer resource) due to a legalizer issue in GlobalISel which does not occur on SelectionDAG: `LLVM ERROR: unable to legalize instruction: %17:_(p8) = G_PTRMASK %0:_, %22:_(s128) (in function: v_ptrmask_buffer_resource_variable_i48)` Added a FIXME to indicate this issue.
This commit is contained in:
parent
121a9c414f
commit
7df0826c41
@ -930,6 +930,14 @@ RegBankLegalizeRules::RegBankLegalizeRules(const GCNSubtarget &_ST,
|
||||
.Any({{UniS128}, {{Sgpr128}, {SgprPtr128}}})
|
||||
.Any({{DivS128}, {{Vgpr128}, {VgprPtr128}}});
|
||||
|
||||
// FIXME: Update llvm/test/CodeGen/AMDGPU/ptrmask.ll to use GlobalISel.
|
||||
// Currently crashes on P8 (buffer resource) tests due to legalizer issue.
|
||||
addRulesForGOpcs({G_PTRMASK})
|
||||
.Any({{UniP1}, {{SgprP1}, {SgprP1, Sgpr64}}})
|
||||
.Any({{DivP1}, {{VgprP1}, {VgprP1, Vgpr64}}})
|
||||
.Any({{UniP3}, {{SgprP3}, {SgprP3, Sgpr32}}})
|
||||
.Any({{DivP3}, {{VgprP3}, {VgprP3, Vgpr32}}});
|
||||
|
||||
addRulesForGOpcs({G_ABS}, Standard).Uni(S16, {{Sgpr32Trunc}, {Sgpr32SExt}});
|
||||
|
||||
addRulesForGOpcs({G_BITREVERSE}, Standard)
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
||||
# RUN: llc -mtriple=amdgcn -run-pass=regbankselect %s -verify-machineinstrs -o - -regbankselect-fast | FileCheck %s
|
||||
# RUN: llc -mtriple=amdgcn -run-pass=regbankselect %s -verify-machineinstrs -o - -regbankselect-greedy | FileCheck %s
|
||||
# RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx1200 -run-pass='amdgpu-regbankselect,amdgpu-regbanklegalize' %s -o - | FileCheck %s
|
||||
|
||||
---
|
||||
name: ptrmask_p1_s_k
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user