[PATCH] D31318: [AMDGPU] Fold V_CNDMASK with identical source operands

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 24 10:55:09 PDT 2017


arsenm added inline comments.


================
Comment at: lib/Target/AMDGPU/SIFoldOperands.cpp:599
+
+  if (Opc == AMDGPU::V_CNDMASK_B32_e32    ||
+      Opc == AMDGPU::V_CNDMASK_B32_e32_si ||
----------------
Probably can drop handling the _e32 version


================
Comment at: lib/Target/AMDGPU/SIFoldOperands.cpp:600-601
+  if (Opc == AMDGPU::V_CNDMASK_B32_e32    ||
+      Opc == AMDGPU::V_CNDMASK_B32_e32_si ||
+      Opc == AMDGPU::V_CNDMASK_B32_e32_vi ||
+      Opc == AMDGPU::V_CNDMASK_B32_e64    ||
----------------
You do not need to check the machine encoded versions


================
Comment at: test/CodeGen/AMDGPU/fold-cndmask.mir:29
+    %5 = COPY %1
+    %6 = V_CNDMASK_B32_e64 %5, 0, %0, implicit %exec
+...
----------------
Need tests for the e32 version or to drop handling them


Repository:
  rL LLVM

https://reviews.llvm.org/D31318





More information about the llvm-commits mailing list