[all-commits] [llvm/llvm-project] 8fd0b3: [InstSimplify] Fix invalid dereference in simplify...
David Sherwood via All-commits
all-commits at lists.llvm.org
Wed Apr 29 05:05:34 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8fd0b3f553e58c586e28e5498b5211446ec985f4
https://github.com/llvm/llvm-project/commit/8fd0b3f553e58c586e28e5498b5211446ec985f4
Author: David Sherwood <david.sherwood at arm.com>
Date: 2026-04-29 (Wed, 29 Apr 2026)
Changed paths:
M llvm/include/llvm/Analysis/InstructionSimplify.h
M llvm/lib/Analysis/InstructionSimplify.cpp
Log Message:
-----------
[InstSimplify] Fix invalid dereference in simplifyBinaryIntrinsic (#194825)
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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list