Skip to content

Fix llvm/test/DebugInfo/Generic/discriminated-union.ll on big-endian targets #125849

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

beetrees
Copy link
Contributor

@beetrees beetrees commented Feb 5, 2025

Fixes the failure of the Solaris/sparcv9 buildbot caused by #125578.

cc @rorth @tromey @dwblaikie

@llvmbot
Copy link
Member

llvmbot commented Feb 5, 2025

@llvm/pr-subscribers-debuginfo

Author: None (beetrees)

Changes

Fixes the failure of the Solaris/sparcv9 buildbot caused by #125578.

cc @rorth @tromey @dwblaikie


Full diff: https://github.com/llvm/llvm-project/pull/125849.diff

1 Files Affected:

  • (modified) llvm/test/DebugInfo/Generic/discriminated-union.ll (+4-3)
diff --git a/llvm/test/DebugInfo/Generic/discriminated-union.ll b/llvm/test/DebugInfo/Generic/discriminated-union.ll
index 592f2152ae6820..0267580eb0cbf3 100644
--- a/llvm/test/DebugInfo/Generic/discriminated-union.ll
+++ b/llvm/test/DebugInfo/Generic/discriminated-union.ll
@@ -1,8 +1,8 @@
 ; RUN: %llc_dwarf -O0 -filetype=obj < %s > %t
-; RUN: llvm-dwarfdump -v -debug-info %t | FileCheck %s
+; RUN: llvm-dwarfdump -v -debug-info %t | FileCheck %s --check-prefix %if target-byteorder-big-endian %{ CHECK-BE %} %else %{ CHECK-LE %}
 
 ; RUN: %llc_dwarf --try-experimental-debuginfo-iterators -O0 -filetype=obj < %s > %t
-; RUN: llvm-dwarfdump -v -debug-info %t | FileCheck %s
+; RUN: llvm-dwarfdump -v -debug-info %t | FileCheck %s --check-prefix %if target-byteorder-big-endian %{ CHECK-BE %} %else %{ CHECK-LE %}
 
 ; Check for a variant part that has two members, one of which has a
 ; discriminant value.
@@ -22,7 +22,8 @@
 ;         CHECK: DW_AT_alignment
 ;         CHECK: DW_AT_data_member_location [DW_FORM_data1]	(0x00)
 ;     CHECK: DW_TAG_variant
-;       CHECK: DW_AT_discr_value [DW_FORM_block1]	(<0x10> 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 )
+;       CHECK-LE: DW_AT_discr_value [DW_FORM_block1]	(<0x10> 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 )
+;       CHECK-BE: DW_AT_discr_value [DW_FORM_block1]	(<0x10> 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 )
 ;       CHECK: DW_TAG_member
 ;         CHECK: DW_AT_type
 ;         CHECK: DW_AT_alignment

@rorth
Copy link
Collaborator

rorth commented Feb 5, 2025

I just tried it successfully on sparcv9-sun-solaris2.11. Thanks.

target-byteorder-*-endian is nice, btw. This would be helpful in other parts of the tree (like flang in particular).

@tromey
Copy link
Contributor

tromey commented Feb 5, 2025

Thank you for doing this. I'm sorry about the breakage.

Copy link
Collaborator

@dwblaikie dwblaikie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is some snazzy new (probably not that new, but first I've seen it) FileCheck stuff - awesome :)

Thanks for the fix!

@dwblaikie dwblaikie merged commit 3492985 into llvm:main Feb 5, 2025
10 checks passed
@beetrees beetrees deleted the fix-128-bit-discriminant-test branch February 5, 2025 17:42
swift-ci pushed a commit to swiftlang/llvm-project that referenced this pull request Feb 8, 2025
Icohedron pushed a commit to Icohedron/llvm-project that referenced this pull request Feb 11, 2025
qiaojbao pushed a commit to GPUOpen-Drivers/llvm-project that referenced this pull request Feb 28, 2025
Local branch amd-gfx b0d0d19 Merged main:acebaa01623b into amd-gfx:58cb02d5f29e
Remote branch main 3492985 Fix `llvm/test/DebugInfo/Generic/discriminated-union.ll` on big-endian targets (llvm#125849)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants