diff options
author | Tim Shen <timshen91@gmail.com> | 2017-01-20 22:05:33 +0000 |
---|---|---|
committer | Tim Shen <timshen91@gmail.com> | 2017-01-20 22:05:33 +0000 |
commit | 867be0d14ce393108d848bcd9d080a92ca6b0006 (patch) | |
tree | 6ca351b65868feb97cbb4fa202597ba6486274af /llvm/lib/LTO/LTOBackend.cpp | |
parent | d88f928a5c4c4a40ee6bdf785767e43ec6167aa8 (diff) | |
download | bcm5719-llvm-867be0d14ce393108d848bcd9d080a92ca6b0006.tar.gz bcm5719-llvm-867be0d14ce393108d848bcd9d080a92ca6b0006.zip |
[Altivec] Change vec_sl to a << (b % (sizeof(a) * 8))
For a << b (as original vec_sl does), if b >= sizeof(a) * 8, the
behavior is undefined. However, Power instructions do define the
behavior, which is equivalent to a << (b % (sizeof(a) * 8)).
This patch changes altivec.h to use a << (b % (sizeof(a) * 8)), to
ensure the consistent semantic of the instructions. Then it combines
the generated multiple instructions back to a single shift.
This patch handles left shift only. Right shift, on the other hand, is
more complicated, considering arithematic/logical right shift.
Differential Revision: https://reviews.llvm.org/D28037
llvm-svn: 292659
Diffstat (limited to 'llvm/lib/LTO/LTOBackend.cpp')
0 files changed, 0 insertions, 0 deletions