I discovered this while working on https://reviews.llvm.org/D22104
The general direction seems to be that of emitting an intrinsic when possible. I was a little bit worried about some architectures not supporting the intrinsic but David pointed out that for targets which don't support the intrinsic the intrinsic will be transformed into a libcall into SDAG.
Details
Details
Diff Detail
Diff Detail