[llvm-commits] [PATCH] RDRAND intrinsics

Benjamin Kramer benny.kra at gmail.com
Fri Jul 6 13:00:47 PDT 2012


The attached patch adds support for intel's rdrand intrinsics to LLVM.

The tricky part is that the intrinsics have to return two values (the random value and the carry flag). This is solved with a pointer argument and a cmov to materialize CF, which matches GCC's output. This approach requires some custom lowering code, but I don't see a way to do it with tablegenerated patterns only.

- Ben

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-support-for-Ivy-Bridge-s-rdrand-intrinsics.patch
Type: application/octet-stream
Size: 9283 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120706/c026e7b5/attachment.obj>


More information about the llvm-commits mailing list