[PATCH] D50913: [FPEnv] Don't need copysign/fabs/fneg constrained intrinsics

Cameron McInally via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 20 17:54:14 PDT 2018


cameron.mcinally added a comment.

> I think fneg as an IR instruction or intrinsic has come up for discussion before, but I don't know why it wasn't implemented at the time. An intrinsic is the lighter weight solution and would line up with the similar:
> 
> http://llvm.org/docs/LangRef.html#llvm-copysign-intrinsic
> http://llvm.org/docs/LangRef.html#llvm-fabs-intrinsic
> 
> Any reason to prefer an actual instruction over an intrinsic?

An intrinsic would work. I'm trying to avoid creating a *constrained* intrinsic, since it doesn't fit well. All of the other constrained intrinsics are on arithmetic operations (can trap). Copysign/abs/neg are bitwise operations (cannot trap). It doesn't seem correct to constrain an operation that cannot trap.


Repository:
  rL LLVM

https://reviews.llvm.org/D50913





More information about the llvm-commits mailing list