From 7f9d0068cf53ca761c4e1843e56e4137d7855a70 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Wed, 9 Apr 2025 12:20:30 +0100 Subject: [PATCH] [X86] getFauxShuffleMask - OR(BITCAST(SHUFFLE()),BITCAST(SHUFFLE())) patterns should return bitcasted source values Noticed while investigating #133947 regressions - if we peek through bitcasts we can lose track of oneuse/combined nodes Same current codegen as combineX86ShufflesRecursively still peeks through the bitcasts itself, but we will soon handle this consistently as another part of #133947 --- llvm/lib/Target/X86/X86ISelLowering.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 47ac1ee571269..53bed634c3cc6 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -6155,8 +6155,8 @@ static bool getFauxShuffleMask(SDValue N, const APInt &DemandedElts, else return false; } - Ops.push_back(N0); - Ops.push_back(N1); + Ops.push_back(N.getOperand(0)); + Ops.push_back(N.getOperand(1)); return true; } case ISD::CONCAT_VECTORS: {