Skip to content

[NFC] [AIX] update gfx12 vop test to use sed instead of grep -o #120458

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
Dec 18, 2024

Conversation

madanial0
Copy link
Contributor

changes from #119778 breaks the AIX clang ppc64 bot: https://lab.llvm.org/buildbot/#/builders/64/builds/1714 as grep -o is not supported on AIX and is not POSIX compatible as per: https://www.unix.com/man-page/posix/1p/grep/

@madanial0 madanial0 self-assigned this Dec 18, 2024
@llvmbot llvmbot added backend:AMDGPU mc Machine (object) code labels Dec 18, 2024
@llvmbot
Copy link
Member

llvmbot commented Dec 18, 2024

@llvm/pr-subscribers-mc

@llvm/pr-subscribers-backend-amdgpu

Author: Mark Danial (madanial0)

Changes

changes from #119778 breaks the AIX clang ppc64 bot: https://lab.llvm.org/buildbot/#/builders/64/builds/1714 as grep -o is not supported on AIX and is not POSIX compatible as per: https://www.unix.com/man-page/posix/1p/grep/


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

1 Files Affected:

  • (modified) llvm/test/MC/AMDGPU/gfx12_asm_vop1.s (+2-2)
diff --git a/llvm/test/MC/AMDGPU/gfx12_asm_vop1.s b/llvm/test/MC/AMDGPU/gfx12_asm_vop1.s
index e701d1626f388e..edd3b916f4e5f3 100644
--- a/llvm/test/MC/AMDGPU/gfx12_asm_vop1.s
+++ b/llvm/test/MC/AMDGPU/gfx12_asm_vop1.s
@@ -1,8 +1,8 @@
 // NOTE: Assertions have been autogenerated by utils/update_mc_test_checks.py UTC_ARGS: --unique --version 5
 // RUN: llvm-mc -triple=amdgcn -mcpu=gfx1200 -mattr=+wavefrontsize32,+real-true16 -show-encoding -comment-column=0 %s | FileCheck --strict-whitespace --check-prefixes=GFX12,GFX12-ASM %s
-// RUN: llvm-mc -triple=amdgcn -mcpu=gfx1200 -mattr=+wavefrontsize32,+real-true16 -show-encoding %s | grep -oE '\[0x[0-9a-fx,]+\]' | llvm-mc -triple=amdgcn -mcpu=gfx1200 -mattr=+wavefrontsize32,+real-true16 -disassemble -show-encoding -comment-column=0 | FileCheck --strict-whitespace --check-prefixes=GFX12,GFX12-DIS %s
+// RUN: llvm-mc -triple=amdgcn -mcpu=gfx1200 -mattr=+wavefrontsize32,+real-true16 -show-encoding %s | sed -n 's#.*\(\[0x[0-9a-fx,]\{1,\}\]\)#\1#p' | llvm-mc -triple=amdgcn -mcpu=gfx1200 -mattr=+wavefrontsize32,+real-true16 -disassemble -show-encoding -comment-column=0 | FileCheck --strict-whitespace --check-prefixes=GFX12,GFX12-DIS %s
 // RUN: llvm-mc -triple=amdgcn -mcpu=gfx1200 -mattr=+wavefrontsize64,+real-true16 -show-encoding -comment-column=0 %s | FileCheck --strict-whitespace --check-prefixes=GFX12,GFX12-ASM %s
-// RUN: llvm-mc -triple=amdgcn -mcpu=gfx1200 -mattr=+wavefrontsize64,+real-true16 -show-encoding %s | grep -oE '\[0x[0-9a-fx,]+\]' | llvm-mc -triple=amdgcn -mcpu=gfx1200 -mattr=+wavefrontsize64,+real-true16 -disassemble -show-encoding -comment-column=0 | FileCheck --strict-whitespace --check-prefixes=GFX12,GFX12-DIS %s
+// RUN: llvm-mc -triple=amdgcn -mcpu=gfx1200 -mattr=+wavefrontsize64,+real-true16 -show-encoding %s | sed -n 's#.*\(\[0x[0-9a-fx,]\{1,\}\]\)#\1#p' | llvm-mc -triple=amdgcn -mcpu=gfx1200 -mattr=+wavefrontsize64,+real-true16 -disassemble -show-encoding -comment-column=0 | FileCheck --strict-whitespace --check-prefixes=GFX12,GFX12-DIS %s
 
 v_bfrev_b32_e32 v5, v1
 // GFX12: v_bfrev_b32_e32 v5, v1 ; encoding: [0x01,0x71,0x0a,0x7e]

Copy link
Contributor

@w2yehia w2yehia left a comment

Choose a reason for hiding this comment

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

Thanks @hubert-reinterpretcast for suggesting the sed solution.
LGTM.

@w2yehia w2yehia changed the title [NFC] update gfx12 vop test to use sed instead of grep [NFC] [AIX] update gfx12 vop test to use sed instead of grep Dec 18, 2024
@madanial0 madanial0 changed the title [NFC] [AIX] update gfx12 vop test to use sed instead of grep [NFC] [AIX] update gfx12 vop test to use sed instead of grep -o Dec 18, 2024
@madanial0 madanial0 merged commit 0987fcc into llvm:main Dec 18, 2024
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:AMDGPU mc Machine (object) code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants