[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
Loading
Please sign in to comment