aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/Signposts.cpp
diff options
context:
space:
mode:
authorMatt Devereau <matthew.devereau@arm.com>2023-01-31 13:30:09 +0000
committerMatt Devereau <matthew.devereau@arm.com>2023-02-20 09:25:34 +0000
commit8299c764bd2d313334dcbabf9dd0a1f872a78612 (patch)
treefe18391072a6ca5e0100a4139ffa3f94e13ac3ea /llvm/lib/Support/Signposts.cpp
parent5fe915bb8c6b963be9c8617fa50aa4d9c1e304fc (diff)
downloadllvm-8299c764bd2d313334dcbabf9dd0a1f872a78612.zip
llvm-8299c764bd2d313334dcbabf9dd0a1f872a78612.tar.gz
llvm-8299c764bd2d313334dcbabf9dd0a1f872a78612.tar.bz2
[InstSimplify] Simplify icmp between Shl instructions of the same value
define i1 @compare_vscales() { %vscale = call i64 @llvm.vscale.i64() %vscalex2 = shl nuw nsw i64 %vscale, 1 %vscalex4 = shl nuw nsw i64 %vscale, 2 %cmp = icmp ult i64 %vscalex2, %vscalex4 ret i1 %cmp } This IR is currently emitted by LLVM. This icmp is redundant as this snippet can be simplified to true or false as both operands originate from the same @llvm.vscale.i64() call. Differential Revision: https://reviews.llvm.org/D142542
Diffstat (limited to 'llvm/lib/Support/Signposts.cpp')
0 files changed, 0 insertions, 0 deletions