Skip to content

Commit 3b370bb

Browse files
authored
Merge pull request #68 from jerboaa/fix_sulong_test
[Backport] Flip a bit in test input to avoid unspecified NaN behavior in bitcode tests.
2 parents 5b68551 + 3d4a74d commit 3b370bb

File tree

1 file changed

+5
-3
lines changed
  • sulong/tests/com.oracle.truffle.llvm.tests.llirtestgen.native

1 file changed

+5
-3
lines changed

sulong/tests/com.oracle.truffle.llvm.tests.llirtestgen.native/prelude.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2021, Oracle and/or its affiliates.
2+
* Copyright (c) 2019, 2023, Oracle and/or its affiliates.
33
*
44
* All rights reserved.
55
*
@@ -76,7 +76,8 @@ int main(void) {
7676
print_input(input);
7777
run(input, input + 32, output);
7878

79-
fill(input, output, 0xffffffffffffffffl, 0);
79+
// not 0xff...f to avoid NaN, otherwise the float test results are unspecified
80+
fill(input, output, 0xfefffffffeffffffl, 0);
8081
print_input(input);
8182
run(input, input + 32, output);
8283

@@ -88,7 +89,8 @@ int main(void) {
8889
print_input(input);
8990
run(input, input + 32, output);
9091

91-
fill(input, output, 0xffffffffffffffffl, -0x0101010101010101l);
92+
// not 0xff...f to avoid NaN, otherwise the float test results are unspecified
93+
fill(input, output, 0xfefffffffeffffffl, -0x0101010101010101l);
9294
print_input(input);
9395
run(input, input + 32, output);
9496

0 commit comments

Comments
 (0)