[llvm] [InstCombine][X86] Fold blendv(x, y, shuffle(bitcast(sext(m)))) -> select(shuffle(m),x,y) (PR #96882)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 3 00:19:40 PDT 2024


================
@@ -2800,6 +2800,23 @@ X86TTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const {
       return SelectInst::Create(NewSelector, Op1, Op0, "blendv");
     }
 
+    // Peek through a one-use shuffle - VectorCombine should have simplified
+    // this for cases where we're splitting wider vectors to use blendv
+    // intrinsics.
+    Value *MaskSrc = nullptr;
----------------
goldsteinn wrote:

Should we `peekThroughBitcast` on `Mask` here?

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


More information about the llvm-commits mailing list