[PATCH] [PPC64] Add 64-bit Vector Integer Arithmetic Instructions
Kit Barton
kbarton at ca.ibm.com
Wed Mar 4 08:24:24 PST 2015
================
Comment at: lib/Headers/altivec.h:6938
@@ +6937,3 @@
+{
+ return __a >> (vector long long)__b;
+}
----------------
nemanjai wrote:
> I am probably missing something, but it seems unclear to me how this will generate the expected instruction. If this code generates an "shr" in the IR and the back end generates a "vsrd" instruction when it sees the corresponding builtin, what tells the back end to emit the instruction when it sees a shift in the IR?
You're right, this was an oversight on my part. I'll fix this, and make the necessary changes on the LLVM side.
================
Comment at: lib/Headers/altivec.h:11318
@@ +11317,3 @@
+#ifdef __POWER8_VECTOR__
+static long long __ATTRS_o_ai
+vec_all_eq(vector long long __a, vector long long __b)
----------------
nemanjai wrote:
> Why the change in the return type for these? All the other ones return int, this one involves a promotion from in to long long. And the return type in the ABI is int.
I'll fix this as well.
http://reviews.llvm.org/D8041
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list