[PATCH] D34377: Support MS builtins using 'long' on LP64

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 20 17:30:16 PDT 2017


rnk added inline comments.


================
Comment at: include/clang/Basic/Builtins.def:55
 //  W   -> int64_t
+//  N   -> 'L' if target is LP64, 'int' size otherwise.
 //  S   -> signed
----------------
Fix the comment? "long" if target is LLP64, "int" otherwise?


================
Comment at: test/CodeGen/ms-intrinsics-darwin.c:1
+// RUN: %clang_cc1 -ffreestanding -fms-extensions \
+// RUN:         -triple x86_64--darwin -Oz -emit-llvm %s -o - \
----------------
I'd rather generalize `test/CodeGen/ms-intrinsics.c` to cover Darwin as well as Windows & Linux.


================
Comment at: test/CodeGen/ms-intrinsics-darwin.c:45
+}
+// CHECK-ARM-X64: define{{.*}}i8 @test_BitScanForward64(i32* {{[a-z_ ]*}}%Index, i64 {{[a-z_ ]*}}%Mask){{.*}}{
+// CHECK-ARM-X64:   [[ISNOTZERO:%[a-z0-9._]+]] = icmp eq i64 %Mask, 0
----------------
You don't have a RUN: line for this.


https://reviews.llvm.org/D34377





More information about the cfe-commits mailing list