LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 39448 - CodeGen/WebAssembly/immediates.ll fails on 32-bit Windows
Summary: CodeGen/WebAssembly/immediates.ll fails on 32-bit Windows
Status: CONFIRMED
Alias: None
Product: libraries
Classification: Unclassified
Component: Backend: WebAssembly (show other bugs)
Version: trunk
Hardware: PC Linux
: P enhancement
Assignee: Thomas Lively
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-26 04:41 PDT by Hans Wennborg
Modified: 2018-11-09 14:12 PST (History)
4 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hans Wennborg 2018-10-26 04:41:23 PDT
The test is old, but I guess nobody tried running it in a 32-bit Windows build before wasm got enabled by default recently in r343746.

I didn't try it on 32-bit Linux, but I assume it's more a 32-bit x86 thing rather than a Windows thing.


FAIL: LLVM :: CodeGen/WebAssembly/immediates.ll (12964 of 28256)
******************** TEST 'LLVM :: CodeGen/WebAssembly/immediates.ll' FAILED ********************
Script:
--
: 'RUN: at line 1';   C:\src\llvm.svn\build.32\bin\llc.EXE < C:\src\llvm.svn\test\CodeGen\WebAssembly\immediates.ll -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-keep-registers | C:\src\llvm.svn\build.32\bin\FileCheck.EXE C:\src\llvm.svn\test\CodeGen\WebAssembly\immediates.ll
--
Exit Code: 1

Command Output (stdout):
--
$ ":" "RUN: at line 1"
$ "C:\src\llvm.svn\build.32\bin\llc.EXE" "-asm-verbose=false" "-disable-wasm-fallthrough-return-opt" "-wasm-keep-registers"
$ "C:\src\llvm.svn\build.32\bin\FileCheck.EXE" "C:\src\llvm.svn\test\CodeGen\WebAssembly\immediates.ll"
# command stderr:
C:\src\llvm.svn\test\CodeGen\WebAssembly\immediates.ll:229:15: error: CHECK-NEXT: expected string not found in input
; CHECK-NEXT: f64.const $push[[NUM:[0-9]+]]=, -nan:0x2bcdef0123456{{$}}
              ^
<stdin>:305:2: note: scanning from here
 f64.const $push0=, -nan:0xabcdef0123456
 ^

error: command failed with exit status: 1

--


It looks like the upper 2 in 0xFFF2BCDEF012345 gets lost somewhere.

r260968 mentions MC converting floating point operands and potentially causing NaNs to change bits. Perhaps it's more of that happening?
Comment 1 Thomas Lively 2018-11-01 17:49:06 PDT
Thanks for the report! I'll look into this soon.
Comment 2 Hans Wennborg 2018-11-05 01:32:07 PST
Thanks. I've excluded wasm from the Windows packagages with r346122 in the meantime.
Comment 3 Thomas Lively 2018-11-09 14:12:31 PST
I've disabled the offending tests for now in  rL346558 and reenabled the windows packaging in rL346559. We may reenable the tests if we decide preserving NaN payloads is worth doing and we fix the target-independent underlying issue. I'll close this issue once we delete or fix the tests.