[llvm] 471f166 - [NFC][PowerPC] Marked the addr-label.ll test unsupported on PowerPC.

Stefan Pintilie via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 31 07:41:34 PDT 2023


Author: Stefan Pintilie
Date: 2023-03-31T10:41:23-04:00
New Revision: 471f1664f38252425b21de562ada95b98f8abf55

URL: https://github.com/llvm/llvm-project/commit/471f1664f38252425b21de562ada95b98f8abf55
DIFF: https://github.com/llvm/llvm-project/commit/471f1664f38252425b21de562ada95b98f8abf55.diff

LOG: [NFC][PowerPC] Marked the addr-label.ll test unsupported on PowerPC.

The addr-label.ll test uses the following setup:

define ptr @test1() nounwind {
entry:
	ret ptr blockaddress(@test1b, %test_label)
}

define i32 @test1b() nounwind {
entry:
	ret i32 -1
test_label:
	br label %ret
ret:
	ret i32 -1
}

However, according to the LLVM Reference guide for blockaddress()
"This value only has defined behavior when used as an operand to the
‘indirectbr’ or for comparisons against null." For this test the value
is just returned as a pointer from test1().

On PowerPC this test has unreliable results as the order in which
passes are run can make this test pass or fail. If the %test_label
in test1b() is removed before a number of passes are completed on
test1() then this test will fail on PowerPC.

I have marked this test as UNSUPPORTED on PowerPC.

Added: 
    

Modified: 
    llvm/test/CodeGen/Generic/addr-label.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/Generic/addr-label.ll b/llvm/test/CodeGen/Generic/addr-label.ll
index f7568311f3d5b..ef82e26aa25b4 100644
--- a/llvm/test/CodeGen/Generic/addr-label.ll
+++ b/llvm/test/CodeGen/Generic/addr-label.ll
@@ -6,6 +6,11 @@
 ; NVPTX cannot select BlockAddress
 ; XFAIL: target=nvptx{{.*}}
 
+; The behavior of this test is not well defined. On PowerPC the test may pass
+; or fail depending on the order in which the test functions are processed by
+; llc.
+UNSUPPORTED: target=powerpc{{.*}}
+
 ;; Reference to a label that gets deleted.
 define ptr @test1() nounwind {
 entry:


        


More information about the llvm-commits mailing list