forked from OSchip/llvm-project
[CUDA] Fix order of memcpy arguments in __shfl_*(<64-bit type>).
Wrong argument order resulted in broken shfl ops for 64-bit types.
This commit is contained in:
parent
966b5182ba
commit
cc14de88da
|
@ -45,7 +45,7 @@
|
||||||
_Static_assert(sizeof(__val) == sizeof(__Bits)); \
|
_Static_assert(sizeof(__val) == sizeof(__Bits)); \
|
||||||
_Static_assert(sizeof(__Bits) == 2 * sizeof(int)); \
|
_Static_assert(sizeof(__Bits) == 2 * sizeof(int)); \
|
||||||
__Bits __tmp; \
|
__Bits __tmp; \
|
||||||
memcpy(&__val, &__tmp, sizeof(__val)); \
|
memcpy(&__tmp, &__val, sizeof(__val)); \
|
||||||
__tmp.__a = ::__FnName(__tmp.__a, __offset, __width); \
|
__tmp.__a = ::__FnName(__tmp.__a, __offset, __width); \
|
||||||
__tmp.__b = ::__FnName(__tmp.__b, __offset, __width); \
|
__tmp.__b = ::__FnName(__tmp.__b, __offset, __width); \
|
||||||
long long __ret; \
|
long long __ret; \
|
||||||
|
@ -129,7 +129,7 @@ __MAKE_SHUFFLES(__shfl_xor, __nvvm_shfl_bfly_i32, __nvvm_shfl_bfly_f32, 0x1f,
|
||||||
_Static_assert(sizeof(__val) == sizeof(__Bits)); \
|
_Static_assert(sizeof(__val) == sizeof(__Bits)); \
|
||||||
_Static_assert(sizeof(__Bits) == 2 * sizeof(int)); \
|
_Static_assert(sizeof(__Bits) == 2 * sizeof(int)); \
|
||||||
__Bits __tmp; \
|
__Bits __tmp; \
|
||||||
memcpy(&__val, &__tmp, sizeof(__val)); \
|
memcpy(&__tmp, &__val, sizeof(__val)); \
|
||||||
__tmp.__a = ::__FnName(__mask, __tmp.__a, __offset, __width); \
|
__tmp.__a = ::__FnName(__mask, __tmp.__a, __offset, __width); \
|
||||||
__tmp.__b = ::__FnName(__mask, __tmp.__b, __offset, __width); \
|
__tmp.__b = ::__FnName(__mask, __tmp.__b, __offset, __width); \
|
||||||
long long __ret; \
|
long long __ret; \
|
||||||
|
|
Loading…
Reference in New Issue