https://llvm.org/bugs/show_bug.cgi?id=31837
Bug ID: 31837 Summary: [PowerPC][InlineAsm][Altivec] Cannot map altivec registers to VSX registers using %x Product: clang Version: trunk Hardware: Other OS: Linux Status: NEW Severity: normal Priority: P Component: Frontend Assignee: unassignedclangb...@nondot.org Reporter: bruno.r...@eldorado.org.br CC: llvm-bugs@lists.llvm.org Classification: Unclassified Created attachment 17923 --> https://llvm.org/bugs/attachment.cgi?id=17923&action=edit Test case The attached test case compiles with gcc-6. Clang complains about invalid operands for xxpermdi: clang-3.9 -Werror -Wall -std=c99 -save-temps -g -maltivec test.c -o test error: invalid operand in inline asm: 'vor $0,$1,$2 xxpermdi ${0:x},${1:x},${2:x},3 ' at line 571687 The idea here is to use an Altivec register for both Altivec and VSX instructions. When using it in a VSX instruction, a given reg vN (e.g. v0) should be referenced as vs(N+32) (e.g. vs32). The assembly generated by gcc: vor 13,1,0 xxpermdi 45,33,32,3 (v13 <=> vs45, v1 <=> vs33, v0 <=> vs32). -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs