[PATCH] D81391: [RISC-V] Do not crash when using -ftrapping-math
Luís Marques via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 8 07:38:28 PDT 2020
luismarques added inline comments.
================
Comment at: llvm/test/CodeGen/RISCV/fp-strict.ll:2-5
+; RUN: llc -O1 -mtriple=riscv64 -mattr="+d" -verify-machineinstrs < %s \
+; RUN: | FileCheck %s -check-prefix=RV64D
+; RUN: llc -O1 -mtriple=riscv32 -mattr="+d" -verify-machineinstrs < %s \
+; RUN: | FileCheck %s -check-prefix=RV32D
----------------
It's probably a good idea to use the hardfloat ABI, to cut down on the amount of GPR to FPR conversion instructions, etc.
================
Comment at: llvm/test/CodeGen/RISCV/fp-strict.ll:131
+entry:
+ %cmp = call i1 @llvm.experimental.constrained.fcmp.f64(double %a, double %b, metadata !"oeq", metadata !"fpexcept.strict")
+ ret i1 %cmp
----------------
Shouldn't this test also have an `fcmps` `oeq` case, showing the proper behavior in terms of NaN signaling, by using the correct RISC-V instruction for that? I haven't yet delved into the `lowerSETCC` implementation but it seems that having such tests here would clarify if this is correctly implemented.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81391/new/
https://reviews.llvm.org/D81391
More information about the llvm-commits
mailing list