[llvm] [SPARC][NFC] Update optcompare test that always returns false (PR #170025)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 29 23:00:00 PST 2025
https://github.com/koachan created https://github.com/llvm/llvm-project/pull/170025
None
>From 1e7a61c215ca3638d9013346b740f03143e34bb4 Mon Sep 17 00:00:00 2001
From: Koakuma <koachan at protonmail.com>
Date: Sun, 30 Nov 2025 13:37:08 +0700
Subject: [PATCH] [SPARC][NFC] Update optcompare test that always returns false
---
llvm/test/CodeGen/SPARC/optcompare.ll | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/llvm/test/CodeGen/SPARC/optcompare.ll b/llvm/test/CodeGen/SPARC/optcompare.ll
index 2eec991deeb97..82915f105b806 100644
--- a/llvm/test/CodeGen/SPARC/optcompare.ll
+++ b/llvm/test/CodeGen/SPARC/optcompare.ll
@@ -143,7 +143,7 @@ if.end:
define i32 @not_equality(i32 %a) nounwind {
; CHECK-LABEL: not_equality:
; CHECK: ! %bb.0: ! %entry
-; CHECK-NEXT: and %o0, 1, %o1
+; CHECK-NEXT: add %o0, -1, %o1
; CHECK-NEXT: cmp %o1, 0
; CHECK-NEXT: bl .LBB4_2
; CHECK-NEXT: nop
@@ -155,15 +155,15 @@ define i32 @not_equality(i32 %a) nounwind {
;
; CHECK64-LABEL: not_equality:
; CHECK64: ! %bb.0: ! %entry
-; CHECK64-NEXT: and %o0, 1, %o1
+; CHECK64-NEXT: add %o0, -1, %o1
; CHECK64-NEXT: cmp %o1, 0
; CHECK64-NEXT: movl %icc, %o0, %o1
; CHECK64-NEXT: retl
; CHECK64-NEXT: mov %o1, %o0
entry:
- %and = and i32 %a, 1
- %cmp = icmp slt i32 %and, 0
- %cond = select i1 %cmp, i32 %a, i32 %and
+ %sub = sub i32 %a, 1
+ %cmp = icmp slt i32 %sub, 0
+ %cond = select i1 %cmp, i32 %a, i32 %sub
ret i32 %cond
}
More information about the llvm-commits
mailing list