[llvm] [AMDGPU] Fold uniform readfirstlane + cndmask (PR #70188)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 26 02:59:23 PDT 2023


================
@@ -1400,6 +1401,81 @@ bool SIFoldOperands::tryFoldFoldableCopy(
   return Changed;
 }
 
+// Try to fold the following pattern:
+//    s_cselect s[2:3], -1, 0
+//    v_cndmask v0, 0, +-1, s[2:3]
----------------
jayfoad wrote:

This pattern is a uniform select. Why would we have selected v_cndmask instead of s_cselect in the first place?

https://github.com/llvm/llvm-project/pull/70188


More information about the llvm-commits mailing list