[llvm-bugs] [Bug 31837] New: [PowerPC][InlineAsm][Altivec] Cannot map altivec registers to VSX registers using %x
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Feb 1 04:23:05 PST 2017
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: unassignedclangbugs at nondot.org
Reporter: bruno.rosa at eldorado.org.br
CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170201/66dc1cbf/attachment.html>
More information about the llvm-bugs
mailing list