232 lines · plain
1define amdgpu_kernel void @test_kernel() {2 ret void3}4 5; Test subtarget detection. Disassembly is only supported for GFX8 and beyond.6;7; ----------------------------------GFX12--------------------------------------8;9; RUN: llc -mtriple=amdgcn-amd-amdhsa --amdhsa-code-object-version=6 -mcpu=gfx12-generic -filetype=obj -O0 -o %t.o %s10; RUN: llvm-objdump -D --arch-name=amdgcn -mllvm --amdhsa-code-object-version=6 --mcpu=gfx12-generic %t.o > %t-specify.txt11; RUN: llvm-objdump -D -mllvm --amdhsa-code-object-version=6 %t.o > %t-detect.txt12; RUN: diff %t-specify.txt %t-detect.txt13;14; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1201 -filetype=obj -O0 -o %t.o %s15; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1201 %t.o > %t-specify.txt16; RUN: llvm-objdump -D %t.o > %t-detect.txt17; RUN: diff %t-specify.txt %t-detect.txt18;19; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1200 -filetype=obj -O0 -o %t.o %s20; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1200 %t.o > %t-specify.txt21; RUN: llvm-objdump -D %t.o > %t-detect.txt22; RUN: diff %t-specify.txt %t-detect.txt23 24; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1250 -filetype=obj -O0 -o %t.o %s25; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1250 %t.o > %t-specify.txt26; RUN: llvm-objdump -D %t.o > %t-detect.txt27; RUN: diff %t-specify.txt %t-detect.txt28 29; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1251 -filetype=obj -O0 -o %t.o %s30; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1251 %t.o > %t-specify.txt31; RUN: llvm-objdump -D %t.o > %t-detect.txt32; RUN: diff %t-specify.txt %t-detect.txt33 34; ----------------------------------GFX11--------------------------------------35;36; RUN: llc -mtriple=amdgcn-amd-amdhsa --amdhsa-code-object-version=6 -mcpu=gfx11-generic -filetype=obj -O0 -o %t.o %s37; RUN: llvm-objdump -D --arch-name=amdgcn -mllvm --amdhsa-code-object-version=6 --mcpu=gfx11-generic %t.o > %t-specify.txt38; RUN: llvm-objdump -D -mllvm --amdhsa-code-object-version=6 %t.o > %t-detect.txt39; RUN: diff %t-specify.txt %t-detect.txt40 41; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1153 -filetype=obj -O0 -o %t.o %s42; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1153 %t.o > %t-specify.txt43; RUN: llvm-objdump -D %t.o > %t-detect.txt44; RUN: diff %t-specify.txt %t-detect.txt45 46; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1152 -filetype=obj -O0 -o %t.o %s47; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1152 %t.o > %t-specify.txt48; RUN: llvm-objdump -D %t.o > %t-detect.txt49; RUN: diff %t-specify.txt %t-detect.txt50 51; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1151 -filetype=obj -O0 -o %t.o %s52; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1151 %t.o > %t-specify.txt53; RUN: llvm-objdump -D %t.o > %t-detect.txt54; RUN: diff %t-specify.txt %t-detect.txt55 56; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1150 -filetype=obj -O0 -o %t.o %s57; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1150 %t.o > %t-specify.txt58; RUN: llvm-objdump -D %t.o > %t-detect.txt59; RUN: diff %t-specify.txt %t-detect.txt60 61; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1103 -filetype=obj -O0 -o %t.o %s62; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1103 %t.o > %t-specify.txt63; RUN: llvm-objdump -D %t.o > %t-detect.txt64; RUN: diff %t-specify.txt %t-detect.txt65 66; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1102 -filetype=obj -O0 -o %t.o %s67; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1102 %t.o > %t-specify.txt68; RUN: llvm-objdump -D %t.o > %t-detect.txt69; RUN: diff %t-specify.txt %t-detect.txt70 71; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1101 -filetype=obj -O0 -o %t.o %s72; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1101 %t.o > %t-specify.txt73; RUN: llvm-objdump -D %t.o > %t-detect.txt74; RUN: diff %t-specify.txt %t-detect.txt75 76; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1100 -filetype=obj -O0 -o %t.o %s77; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1100 %t.o > %t-specify.txt78; RUN: llvm-objdump -D %t.o > %t-detect.txt79; RUN: diff %t-specify.txt %t-detect.txt80 81; ----------------------------------GFX10--------------------------------------82; RUN: llc -mtriple=amdgcn-amd-amdhsa --amdhsa-code-object-version=6 -mcpu=gfx10-3-generic -filetype=obj -O0 -o %t.o %s83; RUN: llvm-objdump -D --arch-name=amdgcn -mllvm --amdhsa-code-object-version=6 --mcpu=gfx10-3-generic %t.o > %t-specify.txt84; RUN: llvm-objdump -D -mllvm --amdhsa-code-object-version=6 %t.o > %t-detect.txt85; RUN: diff %t-specify.txt %t-detect.txt86 87; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1036 -filetype=obj -O0 -o %t.o %s88; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1036 %t.o > %t-specify.txt89; RUN: llvm-objdump -D %t.o > %t-detect.txt90; RUN: diff %t-specify.txt %t-detect.txt91 92; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1035 -filetype=obj -O0 -o %t.o %s93; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1035 %t.o > %t-specify.txt94; RUN: llvm-objdump -D %t.o > %t-detect.txt95; RUN: diff %t-specify.txt %t-detect.txt96 97; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1034 -filetype=obj -O0 -o %t.o %s98; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1034 %t.o > %t-specify.txt99; RUN: llvm-objdump -D %t.o > %t-detect.txt100; RUN: diff %t-specify.txt %t-detect.txt101 102; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1033 -filetype=obj -O0 -o %t.o %s103; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1033 %t.o > %t-specify.txt104; RUN: llvm-objdump -D %t.o > %t-detect.txt105; RUN: diff %t-specify.txt %t-detect.txt106 107; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1032 -filetype=obj -O0 -o %t.o %s108; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1032 %t.o > %t-specify.txt109; RUN: llvm-objdump -D %t.o > %t-detect.txt110; RUN: diff %t-specify.txt %t-detect.txt111 112; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1031 -filetype=obj -O0 -o %t.o %s113; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1031 %t.o > %t-specify.txt114; RUN: llvm-objdump -D %t.o > %t-detect.txt115; RUN: diff %t-specify.txt %t-detect.txt116 117; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1030 -filetype=obj -O0 -o %t.o %s118; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1030 %t.o > %t-specify.txt119; RUN: llvm-objdump -D %t.o > %t-detect.txt120; RUN: diff %t-specify.txt %t-detect.txt121 122; RUN: llc -mtriple=amdgcn-amd-amdhsa --amdhsa-code-object-version=6 -mcpu=gfx10-1-generic -filetype=obj -O0 -o %t.o %s123; RUN: llvm-objdump -D --arch-name=amdgcn -mllvm --amdhsa-code-object-version=6 --mcpu=gfx10-1-generic %t.o > %t-specify.txt124; RUN: llvm-objdump -D -mllvm --amdhsa-code-object-version=6 %t.o > %t-detect.txt125; RUN: diff %t-specify.txt %t-detect.txt126 127; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1013 -filetype=obj -O0 -o %t.o %s128; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1013 %t.o > %t-specify.txt129; RUN: llvm-objdump -D %t.o > %t-detect.txt130; RUN: diff %t-specify.txt %t-detect.txt131 132; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1012 -filetype=obj -O0 -o %t.o %s133; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1012 %t.o > %t-specify.txt134; RUN: llvm-objdump -D %t.o > %t-detect.txt135; RUN: diff %t-specify.txt %t-detect.txt136 137; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1011 -filetype=obj -O0 -o %t.o %s138; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1011 %t.o > %t-specify.txt139; RUN: llvm-objdump -D %t.o > %t-detect.txt140; RUN: diff %t-specify.txt %t-detect.txt141 142; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1010 -filetype=obj -O0 -o %t.o %s143; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1010 %t.o > %t-specify.txt144; RUN: llvm-objdump -D %t.o > %t-detect.txt145; RUN: diff %t-specify.txt %t-detect.txt146 147 148; ----------------------------------GFX9---------------------------------------149;150; RUN: llc -mtriple=amdgcn-amd-amdhsa --amdhsa-code-object-version=6 -mcpu=gfx9-4-generic -filetype=obj -O0 -o %t.o %s151; RUN: llvm-objdump -D --arch-name=amdgcn -mllvm --amdhsa-code-object-version=6 --mcpu=gfx9-4-generic %t.o > %t-specify.txt152; RUN: llvm-objdump -D -mllvm --amdhsa-code-object-version=6 %t.o > %t-detect.txt153; RUN: diff %t-specify.txt %t-detect.txt154 155; RUN: llc -mtriple=amdgcn-amd-amdhsa --amdhsa-code-object-version=6 -mcpu=gfx9-generic -filetype=obj -O0 -o %t.o %s156; RUN: llvm-objdump -D --arch-name=amdgcn -mllvm --amdhsa-code-object-version=6 --mcpu=gfx9-generic %t.o > %t-specify.txt157; RUN: llvm-objdump -D -mllvm --amdhsa-code-object-version=6 %t.o > %t-detect.txt158; RUN: diff %t-specify.txt %t-detect.txt159 160; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx950 -filetype=obj -O0 -o %t.o %s161; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx950 %t.o > %t-specify.txt162; RUN: llvm-objdump -D %t.o > %t-detect.txt163; RUN: diff %t-specify.txt %t-detect.txt164 165; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx942 -filetype=obj -O0 -o %t.o %s166; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx942 %t.o > %t-specify.txt167; RUN: llvm-objdump -D %t.o > %t-detect.txt168; RUN: diff %t-specify.txt %t-detect.txt169 170; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90c -filetype=obj -O0 -o %t.o %s171; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx90c %t.o > %t-specify.txt172; RUN: llvm-objdump -D %t.o > %t-detect.txt173; RUN: diff %t-specify.txt %t-detect.txt174 175; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90a -filetype=obj -O0 -o %t.o %s176; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx90a %t.o > %t-specify.txt177; RUN: llvm-objdump -D %t.o > %t-detect.txt178; RUN: diff %t-specify.txt %t-detect.txt179 180; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx909 -filetype=obj -O0 -o %t.o %s181; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx909 %t.o > %t-specify.txt182; RUN: llvm-objdump -D %t.o > %t-detect.txt183; RUN: diff %t-specify.txt %t-detect.txt184 185; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx908 -filetype=obj -O0 -o %t.o %s186; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx908 %t.o > %t-specify.txt187; RUN: llvm-objdump -D %t.o > %t-detect.txt188; RUN: diff %t-specify.txt %t-detect.txt189 190; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx906 -filetype=obj -O0 -o %t.o %s191; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx906 %t.o > %t-specify.txt192; RUN: llvm-objdump -D %t.o > %t-detect.txt193; RUN: diff %t-specify.txt %t-detect.txt194 195; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx904 -filetype=obj -O0 -o %t.o %s196; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx904 %t.o > %t-specify.txt197; RUN: llvm-objdump -D %t.o > %t-detect.txt198; RUN: diff %t-specify.txt %t-detect.txt199 200; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx902 -filetype=obj -O0 -o %t.o %s201; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx902 %t.o > %t-specify.txt202; RUN: llvm-objdump -D %t.o > %t-detect.txt203; RUN: diff %t-specify.txt %t-detect.txt204 205; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -filetype=obj -O0 -o %t.o %s206; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx900 %t.o > %t-specify.txt207; RUN: llvm-objdump -D %t.o > %t-detect.txt208; RUN: diff %t-specify.txt %t-detect.txt209 210 211; ----------------------------------GFX8---------------------------------------212;213; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx810 -filetype=obj -O0 -o %t.o %s214; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx810 %t.o > %t-specify.txt215; RUN: llvm-objdump -D %t.o > %t-detect.txt216; RUN: diff %t-specify.txt %t-detect.txt217 218; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803 -filetype=obj -O0 -o %t.o %s219; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx803 %t.o > %t-specify.txt220; RUN: llvm-objdump -D %t.o > %t-detect.txt221; RUN: diff %t-specify.txt %t-detect.txt222 223; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx802 -filetype=obj -O0 -o %t.o %s224; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx802 %t.o > %t-specify.txt225; RUN: llvm-objdump -D %t.o > %t-detect.txt226; RUN: diff %t-specify.txt %t-detect.txt227 228; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx801 -filetype=obj -O0 -o %t.o %s229; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx801 %t.o > %t-specify.txt230; RUN: llvm-objdump -D %t.o > %t-detect.txt231; RUN: diff %t-specify.txt %t-detect.txt232