[all-commits] [llvm/llvm-project] 641906: AMDGPU/GlobalISel: Fix constant bus restriction er...
petar-avramovic via All-commits
all-commits at lists.llvm.org
Wed Dec 1 12:37:20 PST 2021
Author: Petar Avramovic <Petar.Avramovic at amd.com>
Date: 2021-12-01 (Wed, 01 Dec 2021)
AMDGPU/GlobalISel: Fix constant bus restriction errors for med3
Detected on targets older then gfx10 (e.g. gfx9) for constants that are
too large to be inlined (constant are sgpr by default).
In med3 combine it is expected that regbankselect maps all operands of
min/max we try to match to vgpr. However constants are mapped to sgpr
and there will be a sgpr-to-vgpr copy. Matchers look through sgpr-to-vgpr
copies and return sgpr and these break constant bus restriction.
Build med3 with all vgpr operands. Use existing sgpr-to-vgpr copies for
matched sgprs. If there is no such copy (not expected) build one.
Differential Revision: https://reviews.llvm.org/D114700
More information about the All-commits