[PATCH] D61419: Support FNeg ConstantExpr folding
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 3 06:40:37 PDT 2019
arsenm added inline comments.
================
Comment at: llvm/test/CodeGen/X86/vec_fneg.ll:144
+; fneg constant folding
----------------
cameron.mcinally wrote:
> arsenm wrote:
> > These should still not be codegen tests. Is this the constant folding that the asm parser does?
> The folding I'd like to test is done whenever a `ConstantExpr::get(...)` or `ConstantExpr::getFNeg(...)` is called. So it's really all over the place. A quick grep shows it's mainly called in IR, but also in Analysis, Transforms, CodeGen, and the AsmParser.
>
> `unittests/IR/ConstantsTest.cpp` seems like a candidate, but this doesn't really fit a unit test.
>
> There is some prior art in `CodeGen` for constant folding tests, but I'm not sure what constant folder they're testing. E.g. `@div_select_constant_fold(...):llvm/test/CodeGen/X86/fdiv-combine.ll`.
>
If any codegen tests are testing the IR constant folding, that's just broken. I would try to just use the asm parser for this
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