For the simplifyBinaryIntrinsic interface the `Call` argument passed in may be null, which differs from other interfaces such as simplifyIntrinsic and simplifyUnaryIntrinsic which require `Call` to be non-null. See FoldBinaryIntrinsic in InstSimplifyFolder.h where the `Call` argument has a default value of null. That means for all uses of `Call` in simplifyBinaryIntrinsic we must first check the pointer is not null to avoid an invalid dereference. This PR fixes the case for the get.active.lane.mask intrinsic. There isn't currently an easy way to test this fix because the only place I can see where FoldBinaryIntrinsic is called without a null `Call` is VPlanTransforms.cpp and we don't currently invoke the function for get.active.lane.mask intrinsics.
290 KiB
290 KiB