File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -10377,6 +10377,22 @@ void Lowering::ContainCheckHWIntrinsic(GenTreeHWIntrinsic* node)
1037710377
1037810378 op1 = node->Op (1 );
1037910379 op1->ClearContained ();
10380+
10381+ // Drop GT_CAST if it doesn't change the op1's bits we're about to broadcast
10382+ if (op1->OperIs (GT_CAST) && !op1->gtOverflow () && comp->opts .Tier0OptimizationEnabled ())
10383+ {
10384+ GenTreeCast* cast = op1->AsCast ();
10385+ if (!varTypeIsFloating (cast->CastToType ()) &&
10386+ !varTypeIsFloating (cast->CastFromType ()) &&
10387+ (genTypeSize (cast->CastToType ()) >= genTypeSize (simdBaseType)) &&
10388+ (genTypeSize (cast->CastFromType ()) >= genTypeSize (simdBaseType)))
10389+ {
10390+ BlockRange ().Remove (op1);
10391+ op1 = cast->CastOp ();
10392+ op1->ClearContained ();
10393+ node->Op (1 ) = op1;
10394+ }
10395+ }
1038010396 }
1038110397 }
1038210398 break ;
You can’t perform that action at this time.
0 commit comments