This program: define void @__gmpn_divrem_1(i32 %d) { entry: %tmp14 = icmp slt i32 %d, 0 ; <i1> [#uses=1] br i1 %tmp14, label %cond_next408, label %cond_false701 cond_next408: ; preds = %entry %tmp553 = icmp sgt i32 0, -1 ; <i1> [#uses=1] br i1 %tmp553, label %bb419, label %bb692 bb419: ; preds = %cond_next408 %tmp531 = call i32 asm "$(a${5:I}$|add${5:I}c$) $1,$4,$5\0A\09$(ae$|adde$) $0,$2,$3", "=r,==r,r,r,r,rI"( i32 * null, i32 0, i32 0, i32 0, i32 0 ) ; <i32> [#uses=0] unreachable bb692: ; preds = %cond_next408 ret void cond_false701: ; preds = %entry ret void } Results in this error: Invalid operand found in inline asm: '$(a${5:I}$|add${5:I}c$) $1,$4,$5 $(ae$|adde$) $0,$2,$3' INLINEASM <es:$(a${5:I}$|add${5:I}c$) $1,$4,$5 $(ae$|adde$) $0,$2,$3>, 10, %r2<def,dead>, 10, %r3<def>, 9, %r2<kill>, 9, %r2<kill>, 9, % r2<kill>, 9, %r2<kill> INLINEASM <es:$(a${5:I}$|add${5:I}c$) $1,$4,$5 $(ae$|adde$) $0,$2,$3> 10 %mreg(57)<d> 10 %mreg(68)<d> 9 %mreg(57) 9 %mreg(57) 9 %mreg(57) 9 %mreg(57)
This was found compiling GMP-4.2.1.
GMP contains much inline assembly. It's worth to use it as good test for inline assembler support. Bill, you compiled GMP in "normal" or "fat" mode?
Yeah. GMP has been the source of some of the inline ASM improvements in the past. :-) Normal; just doing a "./configure && make" command. -bw
I think it's worth to try "fat" build, since it will sum all possible implementations for specific platform.
Hey Bill, In the future, can you please paste the C inline asm from the source when you file a bug? It makes it easier for me to verify that llvm matches GCC's behavior, thanks, -Chris
Fixed, patch here: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070423/048368.html Testcase here: CodeGen/PowerPC/2007-04-24-InlineAsm-I-Modifier.ll -Chris
I will...sorry about not putting the source up there. I didn't have "delta" with me at the time... :-) -bw