[inlineasm] 's' constraint bug #1754
Labels
bugzilla
Issues migrated from bugzilla
compile-fail
Use [accepts-invalid] and [rejects-valid] instead
llvm:codegen
Extended Description
This testcase:
int x[2] = { 1, 2 };
static inline void attribute((always_inline))
insn1 (int x) {
asm volatile ("" :: "n" (x), "i" (x));
}
static inline void attribute((always_inline))
insn2 (const void *x) {
asm volatile ("%0 %1" :: "s" (x), "i" (x));
}
void foo (void) {
insn2 (&x[1]);
}
Should compile to:
_foo:
_x+4 _x+4
blr
We currently produce:
Invalid operand for inline asm constraint 's'!
-Chris
The text was updated successfully, but these errors were encountered: