[PATCH] D61419: Support FNeg constant folding
Cameron McInally via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 2 05:32:43 PDT 2019
cameron.mcinally added inline comments.
================
Comment at: llvm/test/CodeGen/X86/fp-fold.ll:226-242
+
+define float @fneg_undef() {
+; ANY-LABEL: fneg_undef:
+; ANY: # %bb.0:
+; ANY-NEXT: retq
+ %r = fneg float undef
+ ret float %r
----------------
arsenm wrote:
> These tests don't really belong in codegen (same for the vector cases).
>
> Can you also add a test with some weird constant expressions as a source?
> These tests don't really belong in codegen (same for the vector cases).
I'm not that familiar with LLVM's testing layout. Where should they go?
> Can you also add a test with some weird constant expressions as a source?
Do you mean like the `42.0` I see everywhere? Or something more exotic?
There are existing tests that exercise NaN, Inf, and undef in place now. Those came for free from the old `FNEG(X)` -> `FSUB(-0.0, X)` work.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61419/new/
https://reviews.llvm.org/D61419
More information about the llvm-commits
mailing list