[LLVMdev] how to use "new instruction()"

Tim Northover t.p.northover at gmail.com
Thu Apr 16 20:32:40 PDT 2015


> I understand that I can detect the operation first, and use "create" to
> create for each of them. But I don't if there is a generic way to do this
> because if might be add/sub/mul... operations.

I don't think there is. Realistically, just blindly replacing
instructions with vector equivalents is only going to work in a few
cases anyway. You're probably best to intentionally detect those cases
and call the correct CreateXYZ function.

Cheers.

Tim.



More information about the llvm-dev mailing list