[llvm] [SystemZ][z/OS] Fix incorrect codegen for ADA_ENTRY pseudo instruction (PR #101415)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 31 14:50:17 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {darker}-->


:warning: Python code formatter, darker found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
darker --check --diff -r 6aa723daa9d9c54c597788d384b41dd735359316...78838a98d08d0f5c9a482e8c99acf1f1be94ec3b llvm/test/CodeGen/SystemZ/Large/large-ada-01.py llvm/test/CodeGen/SystemZ/Large/large-ada-02.py
``````````

</details>

<details>
<summary>
View the diff from darker here.
</summary>

``````````diff
--- large-ada-01.py	2024-07-31 21:39:51.000000 +0000
+++ large-ada-01.py	2024-07-31 21:49:43.987045 +0000
@@ -1,29 +1,29 @@
 # Test code generation for retrieving function descriptors
 # from the ADA when the ADA is extremely large and forces the
 # generation of a different instruction sequence
 # RUN: %python %s | llc -mtriple=s390x-ibm-zos -O2 | FileCheck %s
 
-# CHECK: llilf	1, {{[0-9]+}} 
+# CHECK: llilf	1, {{[0-9]+}}
 # CHECK-NEXT: la	1, 0(1,8)
 
 from __future__ import print_function
 
 num_calls = 35000
 
 print("define hidden signext i32 @main() {")
 print("entry:")
 
 for i in range(num_calls):
-  print("  call void @foo%d()" % i)
+    print("  call void @foo%d()" % i)
 
 print("  call void @bar(ptr noundef @foo)")
 print("ret i32 0")
 print("}")
 
 for i in range(num_calls):
-  print("declare void @foo%d(...)" % i)
+    print("declare void @foo%d(...)" % i)
 
 print("declare void @bar(ptr noundef)")
 print("define internal void @foo() {")
 print("entry:")
 print("  ret void")
--- large-ada-02.py	2024-07-31 21:39:51.000000 +0000
+++ large-ada-02.py	2024-07-31 21:49:44.000602 +0000
@@ -1,10 +1,10 @@
 # Test code generation for retrieving function descriptors
 # from the ADA when the ADA is extremely large and forces the
 # generation of a different instruction sequence
 # RUN: %python %s | llc -mtriple=s390x-ibm-zos -O2 | FileCheck %s
-	
+
 # CHECK: algfi	8, {{[0-9]+}}
 # CHECK: la	8, 0(8)
 
 from __future__ import print_function
 
@@ -12,21 +12,21 @@
 
 print("define hidden signext i32 @main() {")
 print("entry:")
 
 for i in range(num_calls):
-  print("  call void @foo%d()" % i)
+    print("  call void @foo%d()" % i)
 
 # This is added to force the use of register r8 to generate
 # la 8, 0(8) which generates the algfi instruction
-print("%0 = call ptr asm \" LGR $0,$1\0A\", \"=r,{r8}\"(ptr nonnull @foo)")
+print('%0 = call ptr asm " LGR $0,$1\0A", "=r,{r8}"(ptr nonnull @foo)')
 print("  call void @bar(ptr noundef %0)")
 print("ret i32 0")
 print("}")
 
 for i in range(num_calls):
-  print("declare void @foo%d(...)" % i)
+    print("declare void @foo%d(...)" % i)
 
 print("declare void @bar(ptr noundef)")
 print("define internal void @foo() {")
 print("entry:")
 print("  ret void")

``````````

</details>


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


More information about the llvm-commits mailing list