Enzyme icon indicating copy to clipboard operation
Enzyme copied to clipboard

improve Intrinsics

Open ZuseZ4 opened this issue 3 years ago • 2 comments

Since we create a call using the intrinsics I guess we should still apply some attributes to that call. ReadNone seems safe for all the math ones we look at, NoUnwind seems to also be ok for most since they often don't seem to trap, but probably should be more added case by case? https://llvm.org/docs/LangRef.html#llvm-sqrt-intrinsic Anything else that could be performance relevant?

ZuseZ4 avatar Sep 01 '22 01:09 ZuseZ4

We shouldn't need to add attributes to intrinsic functions since they should get those automatically (for external functions those, they are needed).

wsmoses avatar Sep 01 '22 01:09 wsmoses

Great, was hoping for that but must have missed it in the docs. Then let's just add a new call with default Attributes and fix the remainder where I missed the right round intrinsic.

ZuseZ4 avatar Sep 01 '22 01:09 ZuseZ4