[PATCH] D59778: AMDGPU: Make exec mask optimzations more resistant to block splits
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 25 10:29:28 PDT 2019
rampitec added inline comments.
================
Comment at: lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp:144
+
+ // TODO: Is this really necessary?
+ if (!MBB->isLayoutSuccessor(Succ))
----------------
Yes, in case block is only preceded bit itself. We do not generate this way, but I can write such IR manually. Anyway layout successor means there will be no branch.
================
Comment at: test/CodeGen/AMDGPU/collapse-endcf.mir:146
; GCN: [[V_CMP_NE_U32_e64_:%[0-9]+]]:sreg_64 = V_CMP_NE_U32_e64 2, [[COPY1]], implicit $exec
- ; GCN: [[COPY4:%[0-9]+]]:sreg_64 = COPY $exec, implicit-def $exec
- ; GCN: [[S_AND_B64_1:%[0-9]+]]:sreg_64 = S_AND_B64 [[COPY4]], [[V_CMP_NE_U32_e64_]], implicit-def dead $scc
+ ; GCN: [[S_AND_B64_1:%[0-9]+]]:sreg_64 = S_AND_B64 $exec, [[V_CMP_NE_U32_e64_]], implicit-def dead $scc
; GCN: $exec = S_MOV_B64_term [[S_AND_B64_1]]
----------------
I am not sure autogenerated test really tests anything, as there is no GCN-NEXT. The copy may easily remain and be untested.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59778/new/
https://reviews.llvm.org/D59778
More information about the llvm-commits
mailing list