[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:07:57 PDT 2017


arsenm added inline comments.


================
Comment at: lib/Target/AMDGPU/SIISelLowering.cpp:2355-2356
+
+    SDValue ApertureReg = CreateLiveInRegister(
+        DAG, &AMDGPU::SReg_64RegClass, ApertureRegNo, MVT::i64);
+    SDValue Aperture = SDValue(
----------------
It shouldn't be necessary to add these as live in, they should be reserved registers


================
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);
----------------
You shouldn't emit a raw mov here, this should be a CopyFromReg


https://reviews.llvm.org/D31874





More information about the llvm-commits mailing list