From 565db5808e8ddd354eb28b680d2aafa44b4c1c67 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Fri, 9 Nov 2018 22:04:37 +0000 Subject: [PATCH] [WebAssembly] Disable custom NaN payload tests Summary: These tests fail on 32-bit builds because NaN payload bits in floating point immediates are not necessarily preserved through compilation. This is because the MC layer uses native doubles to store these values. The tests will be reenabled once this problem has been fixed or deleted if we decide we don't care about lowering payload bits. Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D54353 llvm-svn: 346558 --- test/CodeGen/WebAssembly/immediates.ll | 32 +++++++++++++++----------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/test/CodeGen/WebAssembly/immediates.ll b/test/CodeGen/WebAssembly/immediates.ll index fdb7df7d21c..0c96365102d 100644 --- a/test/CodeGen/WebAssembly/immediates.ll +++ b/test/CodeGen/WebAssembly/immediates.ll @@ -216,18 +216,22 @@ define double @neginf_f64() { ret double 0xFFF0000000000000 } -; CHECK-LABEL: custom_nan_f64: -; CHECK-NEXT: .result f64{{$}} -; CHECK-NEXT: f64.const $push[[NUM:[0-9]+]]=, -nan:0xabcdef0123456{{$}} -; CHECK-NEXT: return $pop[[NUM]]{{$}} -define double @custom_nan_f64() { - ret double 0xFFFABCDEF0123456 -} +;; Custom NaN playloads are currently not always preserved because of the use of +;; native doubles in the MC layer. TODO: fix this problem or decide we don't +;; care about preserving NaN payloads. -; CHECK-LABEL: custom_nans_f64: -; CHECK-NEXT: .result f64{{$}} -; CHECK-NEXT: f64.const $push[[NUM:[0-9]+]]=, -nan:0x2bcdef0123456{{$}} -; CHECK-NEXT: return $pop[[NUM]]{{$}} -define double @custom_nans_f64() { - ret double 0xFFF2BCDEF0123456 -} +; XXX-CHECK-LABEL: custom_nan_f64: +; XXX-CHECK-NEXT: .result f64{{$}} +; XXX-CHECK-NEXT: f64.const $push[[NUM:[0-9]+]]=, -nan:0xabcdef0123456{{$}} +; XXX-CHECK-NEXT: return $pop[[NUM]]{{$}} +; define double @custom_nan_f64() { +; ret double 0xFFFABCDEF0123456 +; } + +; XXX-CHECK-LABEL: custom_nans_f64: +; XXX-CHECK-NEXT: .result f64{{$}} +; XXX-CHECK-NEXT: f64.const $push[[NUM:[0-9]+]]=, -nan:0x2bcdef0123456{{$}} +; XXX-CHECK-NEXT: return $pop[[NUM]]{{$}} +; define double @custom_nans_f64() { +; ret double 0xFFF2BCDEF0123456 +; }