[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 11:03:07 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);
----------------
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?


https://reviews.llvm.org/D31874





More information about the llvm-commits mailing list