[llvm] LICM: teach hoistMinMax about samesign (PR #122730)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 13 07:58:27 PST 2025


================
@@ -242,6 +242,35 @@ exit:
   ret i32 %iv
 }
 
+define i32 @test_sgt_samesign(i32 %start, i32 %inv_1, i32 %inv_2) {
+; CHECK-LABEL: @test_sgt_samesign(
+; CHECK-NEXT:  entry:
+; CHECK-NEXT:    [[INVARIANT_UMAX:%.*]] = call i32 @llvm.smax.i32(i32 [[INV_1:%.*]], i32 [[INV_2:%.*]])
----------------
nikic wrote:

Name here should become INVARIANT_SMAX.

https://github.com/llvm/llvm-project/pull/122730


More information about the llvm-commits mailing list