[LLVMdev] signext on function parameters and return.

Steve King steve at metrokings.com
Wed Jul 22 17:45:23 PDT 2015


Hello,
For a simple function taking a short and returning a short, clang
generates IR with this function signature:

define signext i16 @foo(i16 signext %x)

Some questions please:

1) For the input parameter and return value, does the target control
whether clang uses signext vs something else?  If so, how does this
target query work?

2) Does the presence of the signext mean it's imperative to sign
extend, or that extension, only if needed, should be signed?

Thanks,
-steve



More information about the llvm-dev mailing list