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

Pierre van Houtryve via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 26 03:56:18 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]
----------------
Pierre-vh wrote:

I think it's the i32 zext pattern, similar to the i64 zext pattern we fixed.
Last I tried changing it though there were a lot of test changes and not all of them were good. I can try to look again if this patch is not going to land.

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


More information about the llvm-commits mailing list