summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/Encoding.h
diff options
context:
space:
mode:
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>2015-07-15 15:45:53 +0000
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>2015-07-15 15:45:53 +0000
commit8da737a18a7b543e0c5b54e3e609d1a5eda8dddc (patch)
tree85b8c5bf5bafb891af3c5e463b618866e7db6d03 /clang/lib/Format/Encoding.h
parent1e77bb12b4b5feb99263ed9a68d00649baf86a4b (diff)
downloadbcm5719-llvm-8da737a18a7b543e0c5b54e3e609d1a5eda8dddc.tar.gz
bcm5719-llvm-8da737a18a7b543e0c5b54e3e609d1a5eda8dddc.zip
[PPC64LE] Fix vec_sld semantics for little endian
The vec_sld interface provides access to the vsldoi instruction. Unlike most of the vec_* interfaces, we do not attempt to change the generated code for vec_sld based on the endian mode. It is too difficult to correctly infer the desired semantics because of different element types, and the corrected instruction sequence is expensive, involving loading a permute control vector and performing a generalized permute. For GCC, this was implemented as "Don't touch the vec_sld" implementation. When it came time for the LLVM implementation, I did the same thing. However, this was hasty and incorrect. In LLVM's version of altivec.h, vec_sld was previously defined in terms of the vec_perm interface. Because vec_perm semantics are adjusted for little endian, this means that leaving vec_sld untouched causes it to generate something different for LE than for BE. Not good. This patch adjusts the form of vec_perm that is used for vec_sld and vec_vsldoi, effectively undoing the modifications so that the same vsldoi instruction will be generated for both BE and LE. There is an accompanying back-end patch to take care of some small ripple effects caused by these changes. llvm-svn: 242297
Diffstat (limited to 'clang/lib/Format/Encoding.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud