[llvm] [AArch64] Fix tryMergeAdjacentSTG function in PrologEpilog pass (PR #68873)

Kristof Beyls via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 23 07:16:59 PDT 2023


================
@@ -289,3 +289,72 @@ entry:
   call void @llvm.aarch64.settag(ptr %c2, i64 128)
   ret void
 }
+
+; Function Attrs: nounwind
+declare i32 @printf(ptr, ...) #0
+
+ at .str = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
+
+; Case 1
+; Insert point of stg merge is followed by nzcv read
+; Don't merge in this case
+
+define i32 @stg_no_merge(i32 %in) {
----------------
kbeyls wrote:

Maybe the test name would be slightly better if it included something like `nzcv_clobber` or something similar to indicate that the STGs should not be merged because of a NZCV getting clobbered?

https://github.com/llvm/llvm-project/pull/68873


More information about the llvm-commits mailing list