File tree 1 file changed +14
-2
lines changed 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -7124,15 +7124,27 @@ ExceptionSetFlags GenTree::OperExceptions(Compiler* comp)
7124
7124
7125
7125
GenTreeHWIntrinsic* hwIntrinsicNode = this->AsHWIntrinsic();
7126
7126
7127
+ ExceptionSetFlags flags = ExceptionSetFlags::None;
7127
7128
if (hwIntrinsicNode->OperIsMemoryLoadOrStore())
7128
7129
{
7129
7130
// TODO-CQ: We should use comp->fgAddrCouldBeNull on the address operand
7130
7131
// to determine if this can actually produce an NRE or not
7132
+ flags |= ExceptionSetFlags::NullReferenceException;
7133
+ }
7131
7134
7132
- return ExceptionSetFlags::NullReferenceException;
7135
+ #ifdef TARGET_XARCH
7136
+ NamedIntrinsic intrinsicId = hwIntrinsicNode->GetHWIntrinsicId();
7137
+ if ((intrinsicId == NI_Vector128_op_Division) || (intrinsicId == NI_Vector256_op_Division) ||
7138
+ (intrinsicId == NI_Vector512_op_Division))
7139
+ {
7140
+ // We currently don't try to avoid setting these flags and GTF_EXCEPT when
7141
+ // we know that the operation in fact cannot overflow/divide by zero.
7142
+ assert(varTypeIsInt(AsHWIntrinsic()->GetSimdBaseType()));
7143
+ flags |= ExceptionSetFlags::OverflowException | ExceptionSetFlags::DivideByZeroException;
7133
7144
}
7145
+ #endif
7134
7146
7135
- return ExceptionSetFlags::None ;
7147
+ return flags ;
7136
7148
}
7137
7149
#endif // FEATURE_HW_INTRINSICS
7138
7150
You can’t perform that action at this time.
0 commit comments