[llvm-branch-commits] [llvm] a268b61 - Add test
Nikita Popov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Jul 28 01:03:08 PDT 2025
Author: Nikita Popov
Date: 2025-07-28T10:02:10+02:00
New Revision: a268b616a622b20056c908c53aa762d1fc5402f1
URL: https://github.com/llvm/llvm-project/commit/a268b616a622b20056c908c53aa762d1fc5402f1
DIFF: https://github.com/llvm/llvm-project/commit/a268b616a622b20056c908c53aa762d1fc5402f1.diff
LOG: Add test
Added:
llvm/test/CodeGen/Mips/nan_lowering.ll
Modified:
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/Mips/nan_lowering.ll b/llvm/test/CodeGen/Mips/nan_lowering.ll
new file mode 100644
index 0000000000000..2a11278e14b6c
--- /dev/null
+++ b/llvm/test/CodeGen/Mips/nan_lowering.ll
@@ -0,0 +1,25 @@
+; RUN: llc -mtriple=mips-linux-gnu -mattr=-nan2008 < %s | FileCheck %s
+; RUN: llc -mtriple=mips-linux-gnu -mattr=+nan2008 < %s | FileCheck %s
+
+; Make sure that lowering does not corrupt the value of NaN values,
+; regardless of what the NaN mode is.
+
+define float @test1() {
+; CHECK: .4byte 0x7fc00000
+ ret float bitcast (i32 u0x7fc00000 to float)
+}
+
+define float @test2() {
+; CHECK: .4byte 0x7fc00001
+ ret float bitcast (i32 u0x7fc00001 to float)
+}
+
+define float @test3() {
+; CHECK: .4byte 0x7f800000
+ ret float bitcast (i32 u0x7f800000 to float)
+}
+
+define float @test4() {
+; CHECK: .4byte 0x7f800001
+ ret float bitcast (i32 u0x7f800001 to float)
+}
More information about the llvm-branch-commits
mailing list