Skip to content

Commit 1a2329e

Browse files
committed
Fixup: wrap an intrinsic node which is used as a mask op for ConditionalSelect in another ConditionalSelect if required
1 parent 7827d1d commit 1a2329e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/coreclr/jit/lowerarmarch.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1303,7 +1303,8 @@ GenTree* Lowering::LowerHWIntrinsic(GenTreeHWIntrinsic* node)
13031303
{
13041304
GenTree* user = use.User();
13051305
// Wrap the intrinsic in ConditionalSelect only if it is not already inside another ConditionalSelect
1306-
if (!user->OperIsHWIntrinsic() || (user->AsHWIntrinsic()->GetHWIntrinsicId() != NI_Sve_ConditionalSelect))
1306+
if (!user->OperIsHWIntrinsic() || (user->AsHWIntrinsic()->GetHWIntrinsicId() != NI_Sve_ConditionalSelect) ||
1307+
(HWIntrinsic(user->AsHWIntrinsic()).op1 == node))
13071308
{
13081309
CorInfoType simdBaseJitType = node->GetSimdBaseJitType();
13091310
unsigned simdSize = node->GetSimdSize();

0 commit comments

Comments
 (0)