[LLVMdev] problem compiling x86 intrinsic function
fima rabin
fimarn at yahoo.com
Tue Dec 29 05:50:39 PST 2009
I am trying to compile this little C-program:
=================
typedef double v2f64 __attribute__((ext_vector_type(2)));
int sse2_cmp_sd(v2f64, v2f64, char ) asm("llvm.x86.sse2.cmp.sd");
int main()
{
static int i;
static float x[10];
static float y[10];
v2f64 m1;
v2f64 m2;
int j;
i = sse2_cmp_sd(m1,m2,'z');
==========================
I expected to see inline code for one of the X86 intrinsic functions. However, when I looked
at the *.ll file I see this function declared as
declare i32 @"\01llvm.x86.sse2.cmp.sd"(<2 x double>, <2 x double>, i8 signext)
with extra "01" character in front of the name. Subsequently this function does not match the intrinsic function
name and the resulting code produces a call to "llvm.x86.sse2.cmp.sd" function instead of inline code.
Is my C-program incorrect?
Thanks.
More information about the llvm-dev
mailing list