[PATCH] D27251: [PPC] some bugs mainly about sign problem fixed in altivec.h

Kit Barton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 4 12:03:48 PST 2017


kbarton added a comment.

Sorry, I don't have time to go through the entire patch in detail right now. But I did notice several places where the lines are too long, which need to get fixed.



================
Comment at: lib/Headers/altivec.h:14206
                                               vector signed long long __b) {
-  return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__a,
-                                      (vector unsigned long long)__b);
+  return __builtin_altivec_vcmpgtsd_p(__CR6_LT, (vector signed long long)__a, __b);
 }
----------------
line too long


================
Comment at: lib/Headers/altivec.h:14381
                                               vector signed long long __b) {
-  return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__a,
-                                      (vector unsigned long long)__b);
+  return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, (vector signed long long)__a, __b);
 }
----------------
line too long


================
Comment at: lib/Headers/altivec.h:14549
                                               vector signed long long __b) {
-  return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__b,
-                                      (vector unsigned long long)__a);
+  return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __b, (vector signed long long)__a);
 }
----------------
line too long


https://reviews.llvm.org/D27251





More information about the cfe-commits mailing list