Add a convenience Op Rsqrt which is 1 / sqrt.
Also add the SameOperandsAndResultType trait to the Log Op.
Differential D74406
Add RsqrtOp to LLVM dialect. akuegel on Feb 11 2020, 6:33 AM. Authored by
Details
Diff Detail
Unit Tests
Event TimelineComment Actions Feel free to remove the changes to log. But with your change it seems even less consistent than before. This should be cleaned up, though.
Comment Actions I don't think this belongs to the LLVM dialect. LLVM IR does not have rsqrt as operation or intrinsics, so neither should the dialect. We can have it in a higher-level dialect that lowers to llvm.intr.sqrt (to introduce) and llvm.fdiv (already available). But this expansion should _not_ happen when converting from the LLVM dialect to LLVM IR, that mapping is intentionally kept trivial. |
Hmm, these could all be UnaryIntrinsicsOp, no? Or am I missing something?
Not that you need to clean this up but as you touched this one, why not the others?