[AMDGPU][GlobalISel] Add RegBankLegalize rules for amdgcn_prng_b32 (#178741)

This commit is contained in:
vangthao95 2026-01-30 08:39:27 -08:00 committed by GitHub
parent c329074f7f
commit 8fa695afed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -1256,6 +1256,10 @@ RegBankLegalizeRules::RegBankLegalizeRules(const GCNSubtarget &_ST,
.Uni(S64, {{UniInVgprS64}, {IntrId, Vgpr64}})
.Div(S64, {{Vgpr64}, {IntrId, Vgpr64}});
addRulesForIOpcs({amdgcn_prng_b32})
.Any({{UniS32}, {{UniInVgprS32}, {IntrId, Vgpr32}}})
.Any({{DivS32}, {{Vgpr32}, {IntrId, Vgpr32}}});
addRulesForIOpcs({amdgcn_ubfe, amdgcn_sbfe}, Standard)
.Div(S32, {{Vgpr32}, {IntrId, Vgpr32, Vgpr32, Vgpr32}})
.Uni(S32, {{Sgpr32}, {IntrId, Sgpr32, Sgpr32, Sgpr32}, S_BFE})

View File

@ -1,7 +1,7 @@
; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx950 < %s | FileCheck -check-prefixes=GCN %s
; RUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx950 < %s | FileCheck -check-prefix=GCN %s
; RUN: llc -global-isel=1 -new-reg-bank-select -mtriple=amdgcn -mcpu=gfx950 < %s | FileCheck -check-prefix=GCN %s
; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx1250 < %s | FileCheck -check-prefixes=GCN,SDAG %s
; RUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx1250 < %s | FileCheck -check-prefix=GCN %s
; RUN: llc -global-isel=1 -new-reg-bank-select -mtriple=amdgcn -mcpu=gfx1250 < %s | FileCheck -check-prefix=GCN %s
declare i32 @llvm.amdgcn.prng.b32(i32) #0