[PATCH] D50913: [FPEnv] Don't need copysign/fabs/fneg constrained intrinsics
Andy Kaylor via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 23 14:53:07 PDT 2018
andrew.w.kaylor added a comment.
In https://reviews.llvm.org/D50913#1211409, @arsenm wrote:
> This is more a question of lowering and not an IR semantics question. The fneg will be defined as having no side effects or trapping. If through some architectural specific quirk the expected instructions need something more to avoid this, then that is their issue to deal with. Since it should always be impleentable with bitwise operations, this shouldn't be an issue
As I said, all LLVM IR FP instructions are //assumed// to have no side effects. I'm not sure we want an instruction that goes beyond this to be //defined// as having no side effects. It adds a complication to the language and introduces restrictions on the code generator that aren't needed in the ordinary case of non-constrained FP. The target code generators are free to do anything they want with the other FP instructions, including things that introduce new FP status flags being set that otherwise wouldn't be, and for the normal case the back ends should be free to do that with fneg as well.
Repository:
rL LLVM
https://reviews.llvm.org/D50913
More information about the llvm-commits
mailing list