[PATCH] D18200: Add __atomic_* lowering to AtomicExpandPass.

David Li via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 17 22:49:47 PDT 2016


davidxl added a subscriber: davidxl.

================
Comment at: test/Transforms/AtomicExpand/SPARC/libcalls.ll:10
@@ +9,3 @@
+target datalayout = "e-m:e-p:32:32-i64:64-f128:64-n32-S64"
+target triple = "sparc-unknown-unknown"
+
----------------
Perhaps move the option to the command line?

================
Comment at: test/Transforms/AtomicExpand/SPARC/libcalls.ll:48
@@ +47,3 @@
+; CHECK:  store i16 %old, i16* %2, align 2
+; CHECK:  %4 = call zeroext i1 @__atomic_compare_exchange_2(i8* %1, i8* %3, i16 %new, i32 5, i32 0)
+; CHECK:  %5 = load i16, i16* %2, align 2
----------------
Are these casting from i16 * -> i8 * necessary?

Also should __atomoic_compare_exchange_2's  4th argument  be a bool value selecting weak/strong form of compare and exchange ?

================
Comment at: test/Transforms/AtomicExpand/SPARC/libcalls.ll:77
@@ +76,3 @@
+; CHECK:  %1 = bitcast i128* %arg to i8*
+; CHECK:  %2 = alloca i128, align 16
+; CHECK:  %3 = bitcast i128* %2 to i8*
----------------
are the checks for alloca, bitcast necessary for the test?


http://reviews.llvm.org/D18200





More information about the llvm-commits mailing list