[PATCH] D31874: AMDGPU: Switch aperture queries to use aperture registers instead of s_getreg_b32
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 10 15:37:54 PDT 2017
arsenm added inline comments.
================
Comment at: lib/Target/AMDGPU/SIISelLowering.cpp:2357-2358
+ DAG, &AMDGPU::SReg_64RegClass, ApertureRegNo, MVT::i64);
+ SDValue Aperture = SDValue(
+ DAG.getMachineNode(AMDGPU::S_MOV_B64, DL, MVT::i64, ApertureReg), 0);
+ return DAG.getTargetExtractSubreg(AMDGPU::sub1, DL, MVT::i32, Aperture);
----------------
kzhuravl wrote:
> arsenm wrote:
> > arsenm wrote:
> > > You shouldn't emit a raw mov here, this should be a CopyFromReg
> > Also this is extracting the sub register when you can just directly copy from the sub register?
> Did you mean copy directly from the sub register of src_*_base? If yes, then I do not think it is possible, as it is an 64 bit inline constant, and there are no inline constants for _lo and _hi parts. If no, can you elaborate?
>
> Thanks.
I think it is possible for sub0, but maybe not sub1. These are still modeled as constant registers, so at least getRegister should work, although you probably need the separate extract still
https://reviews.llvm.org/D31874
More information about the llvm-commits
mailing list