https://bugs.llvm.org/show_bug.cgi?id=49343
Bug ID: 49343
Summary: aarch64 inline asm: miscompilation depending on
function parameters order
Product: clang
Version: trunk
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: jacob.benoi...@gmail.com
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org,
neeil...@live.com, richard-l...@metafoo.co.uk
compiler explorer link: https://godbolt.org/z/e9n49n
code:
#include <arm_neon.h>
// output:
// smlal v0.4s, v1.4h, v2.4h
int32x4_t good(int32x4_t acc, int16x4_t x, int16x4_t y) {
asm("smlal %[acc].4s, %[x].4h, %[y].4h"
: [acc]"=w"(acc)
: [x]"w"(x),
[y]"w"(y)
:);
return acc;
}
// output:
// smlal v0.4s, v0.4h, v1.4h
// bug: v0 is used for both x and y arguments!
int32x4_t bad(int16x4_t x, int16x4_t y, int32x4_t acc) {
asm("smlal %[acc].4s, %[x].4h, %[y].4h"
: [acc]"=w"(acc)
: [x]"w"(x),
[y]"w"(y)
:);
return acc;
}
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs