[SCCP] Skip computing intrinsics if one of its args is unknownOrUndef
authorluxufan <luxufan@iscas.ac.cn>
Sat, 10 Jun 2023 07:48:46 +0000 (15:48 +0800)
committerluxufanxport https_proxy=http://127.0.0.1:1080 <luxufan@iscas.ac.cn>
Sat, 10 Jun 2023 07:48:46 +0000 (15:48 +0800)
commit25d9fde22e609f8637f720220810429745707b76
treef438ffdfcf4738a2817ee9bf644001e71e488542
parent3abdd401292d5404636669ee5f970445265d42a5
[SCCP] Skip computing intrinsics if one of its args is unknownOrUndef

For constant range supported intrinsics, we got consantrange from args
no matter if they are unknown or undef. And the constant range computed
from unknown or undef value state is full range.

I think compute with full constant range is harmful since although we
can do mergeIn after these args value state are changed, the merge
operation of two constant ranges is union.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D152499
llvm/lib/Transforms/Utils/SCCPSolver.cpp
llvm/test/Transforms/SCCP/intrinsics.ll