[LLVMdev] Does llvm intrinsic function allow "complicated" arguments?
t.p.northover at gmail.com
Fri Mar 27 07:48:59 PDT 2015
On 27 March 2015 at 07:22, kewuzhang <kewu.zhang at amd.com> wrote:
> int bitcast (i16 337203 to i32)
> I think something is messed up, but the getOperand(i) is llvm core function. So I suspect the above intrinsic call is legal or not?
Bitcast only works between types of the same size. You shouldn't even
have been able to create that expression. It's strongly recommended
that you use a build of LLVM with assertions enabled for development,
are you doing that?
Either way, for i16 -> i32, your options are "zext" or "sext".
More information about the llvm-dev