This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Add gfx1035 target
ClosedPublic

Authored by aakanksha555 on Jun 23 2021, 11:31 AM.

Diff Detail

Event Timeline

aakanksha555 created this revision.Jun 23 2021, 11:31 AM
aakanksha555 requested review of this revision.Jun 23 2021, 11:31 AM
Herald added projects: Restricted Project, Restricted Project, Restricted Project. · View Herald TranscriptJun 23 2021, 11:31 AM
This revision is now accepted and ready to land.Jun 23 2021, 12:31 PM
foad added inline comments.Jun 24 2021, 12:16 AM
clang/test/Driver/amdgpu-mcpu.cl
138

Typo in check prefix. Why didn't this make the test fail?

llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp
178

Please update this switch too.

llvm/test/CodeGen/AMDGPU/directive-amdgcn-target.ll
91

You've added a RUN line here but no checks that use the new prefix. (Doesn't that make llvm-lit complain?)

184

Add a RUN line here?

aakanksha555 marked 4 inline comments as done.

Addressed feedback; fixed typo and missing check lines.

foad added a comment.Jun 24 2021, 9:47 AM

Looks OK. Have you run check-llvm and check-clang?

Looks OK. Have you run check-llvm and check-clang?

I did, no other failing tests observed.

This revision was landed with ongoing or failed builds.Jun 24 2021, 11:34 AM
This revision was automatically updated to reflect the committed changes.
MaskRay added inline comments.Jun 24 2021, 11:39 AM
llvm/test/Object/AMDGPU/elf-header-flags-mach.yaml
189

sed can be replaced by FileCheck -D (search examples in test/tools/).

The long list becomes unwieldy now. @jhenderson Suggestions on decreasing the number of RUN lines?

jhenderson added inline comments.Jun 25 2021, 12:43 AM
llvm/test/Object/AMDGPU/elf-header-flags-mach.yaml
189

sed can be replaced by FileCheck -D (search examples in test/tools/).

Is that true in this context? The sed command is controlling input to yaml2obj, not some FileCheck stuff.

The long list becomes unwieldy now. @jhenderson Suggestions on decreasing the number of RUN lines?

I think you could use additional -D options for FileCheck. Something like the following:

# RUN: llvm-readobj ... | FileCheck --check-prefixes=ELF-ALL,ELF-AMDGCN -DNAME=EF_AMDGPU_MACH_AMDGCN_GFX1035 -DVAL=0x3D
# RUN: obj2yaml ... | FileCheck %s --check-prefixes=YAML-ALL,YAML-AMDGCN -DFLAG=EF_AMDGPU_MACH_AMDGCN_GFX1035
## Repeat for all the other values.

## NB: Some of these might be better with the -NEXT suffix.
# ELF-R600: Format: elf32-amdgpu
# ELF-R600: Arch: r600
# ELF-R600: AddressSize: 32bit

# ELF-AMDGCN: Format: elf64-amdgpu
# ELF-AMDGCN: Arch: amdgcn
# ELF-AMDGCN: AddressSize: 64bit

# ELF-ALL:      Flags [
# ELF-ALL-NEXT:   [[NAME]] ([[VAL]])
# ELF-ALL-NEXT: ]

# YAML-R600:   Class: ELFCLASS32
# YAML-AMDGCN: Class: ELFCLASS64
# YAML-ALL:    Flags: [ [[FLAG]] ]