[PATCH] D49424: [PowerPC] Handle __builtin_xxpermdi the same way as GCC does

Sean Fertile via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 17 18:23:19 PDT 2018


sfertile added inline comments.


================
Comment at: lib/CodeGen/CGBuiltin.cpp:10781
     // endian platforms (i.e. index is complemented and source vector reversed).
-    unsigned ElemIdx0;
-    unsigned ElemIdx1;
-    if (getTarget().isLittleEndian()) {
-      ElemIdx0 = (~Index & 1) + 2;
-      ElemIdx1 = (~Index & 2) >> 1;
-    } else { // BigEndian
-      ElemIdx0 = (Index & 2) >> 1;
-      ElemIdx1 = 2 + (Index & 1);
-    }
+    unsigned ElemIdx0 = (Index & 2) >> 1;;
+    unsigned ElemIdx1 = 2 + (Index & 1);;
----------------
There is an extra `;`on each line.


Repository:
  rC Clang

https://reviews.llvm.org/D49424





More information about the cfe-commits mailing list