[llvm] 66cea71 - [RISCV] Add test case for #78783. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 19 14:46:59 PST 2024
Author: Craig Topper
Date: 2024-01-19T14:44:47-08:00
New Revision: 66cea7143afd401f9d8c70966d21a6d19c65da9d
URL: https://github.com/llvm/llvm-project/commit/66cea7143afd401f9d8c70966d21a6d19c65da9d
DIFF: https://github.com/llvm/llvm-project/commit/66cea7143afd401f9d8c70966d21a6d19c65da9d.diff
LOG: [RISCV] Add test case for #78783. NFC
Added:
Modified:
llvm/test/CodeGen/RISCV/riscv-codegenprepare.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/RISCV/riscv-codegenprepare.ll b/llvm/test/CodeGen/RISCV/riscv-codegenprepare.ll
index 0e4e04af4a3fe7e..f58b01c7395af6d 100644
--- a/llvm/test/CodeGen/RISCV/riscv-codegenprepare.ll
+++ b/llvm/test/CodeGen/RISCV/riscv-codegenprepare.ll
@@ -91,3 +91,15 @@ for.body: ; preds = %for.body, %for.body
%niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
br i1 %niter.ncmp.1, label %for.cond.cleanup.loopexit.unr-lcssa, label %for.body
}
+
+; TODO: We should not change 4294967295 to -1 here.
+define i64 @bug(i32 %x) {
+; CHECK-LABEL: @bug(
+; CHECK-NEXT: [[A:%.*]] = sext i32 [[X:%.*]] to i64
+; CHECK-NEXT: [[B:%.*]] = and i64 [[A]], -1
+; CHECK-NEXT: ret i64 [[B]]
+;
+ %a = sext i32 %x to i64
+ %b = and i64 %a, 4294967295
+ ret i64 %b
+}
More information about the llvm-commits
mailing list