[llvm] [AMDGPU] Fold uniform readfirstlane + cndmask (PR #70188)
Pierre van Houtryve via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 26 03:25:28 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 we just have some other patterns like in the ticket that always emit a cndmask, even with a cselect would do the trick. I'll have a closer look.
https://github.com/llvm/llvm-project/pull/70188
More information about the llvm-commits
mailing list