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

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 3 10:21:46 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:

I still feel like this patch is just trying to work around poor instruction selection. Can you put up a patch for changing the i32 zext selection pattern, so we can look at that?

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


More information about the llvm-commits mailing list