1define amdgpu_kernel void @test_kernel() { 2 ret void 3} 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 %s 10; RUN: llvm-objdump -D --arch-name=amdgcn -mllvm --amdhsa-code-object-version=6 --mcpu=gfx12-generic %t.o > %t-specify.txt 11; RUN: llvm-objdump -D -mllvm --amdhsa-code-object-version=6 %t.o > %t-detect.txt 12; RUN: diff %t-specify.txt %t-detect.txt 13; 14; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1201 -filetype=obj -O0 -o %t.o %s 15; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1201 %t.o > %t-specify.txt 16; RUN: llvm-objdump -D %t.o > %t-detect.txt 17; RUN: diff %t-specify.txt %t-detect.txt 18; 19; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1200 -filetype=obj -O0 -o %t.o %s 20; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1200 %t.o > %t-specify.txt 21; RUN: llvm-objdump -D %t.o > %t-detect.txt 22; RUN: diff %t-specify.txt %t-detect.txt 23 24; ----------------------------------GFX11-------------------------------------- 25; 26; RUN: llc -mtriple=amdgcn-amd-amdhsa --amdhsa-code-object-version=6 -mcpu=gfx11-generic -filetype=obj -O0 -o %t.o %s 27; RUN: llvm-objdump -D --arch-name=amdgcn -mllvm --amdhsa-code-object-version=6 --mcpu=gfx11-generic %t.o > %t-specify.txt 28; RUN: llvm-objdump -D -mllvm --amdhsa-code-object-version=6 %t.o > %t-detect.txt 29; RUN: diff %t-specify.txt %t-detect.txt 30 31; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1153 -filetype=obj -O0 -o %t.o %s 32; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1153 %t.o > %t-specify.txt 33; RUN: llvm-objdump -D %t.o > %t-detect.txt 34; RUN: diff %t-specify.txt %t-detect.txt 35 36; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1152 -filetype=obj -O0 -o %t.o %s 37; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1152 %t.o > %t-specify.txt 38; RUN: llvm-objdump -D %t.o > %t-detect.txt 39; RUN: diff %t-specify.txt %t-detect.txt 40 41; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1151 -filetype=obj -O0 -o %t.o %s 42; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1151 %t.o > %t-specify.txt 43; RUN: llvm-objdump -D %t.o > %t-detect.txt 44; RUN: diff %t-specify.txt %t-detect.txt 45 46; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1150 -filetype=obj -O0 -o %t.o %s 47; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1150 %t.o > %t-specify.txt 48; RUN: llvm-objdump -D %t.o > %t-detect.txt 49; RUN: diff %t-specify.txt %t-detect.txt 50 51; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1103 -filetype=obj -O0 -o %t.o %s 52; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1103 %t.o > %t-specify.txt 53; RUN: llvm-objdump -D %t.o > %t-detect.txt 54; RUN: diff %t-specify.txt %t-detect.txt 55 56; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1102 -filetype=obj -O0 -o %t.o %s 57; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1102 %t.o > %t-specify.txt 58; RUN: llvm-objdump -D %t.o > %t-detect.txt 59; RUN: diff %t-specify.txt %t-detect.txt 60 61; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1101 -filetype=obj -O0 -o %t.o %s 62; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1101 %t.o > %t-specify.txt 63; RUN: llvm-objdump -D %t.o > %t-detect.txt 64; RUN: diff %t-specify.txt %t-detect.txt 65 66; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1100 -filetype=obj -O0 -o %t.o %s 67; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1100 %t.o > %t-specify.txt 68; RUN: llvm-objdump -D %t.o > %t-detect.txt 69; RUN: diff %t-specify.txt %t-detect.txt 70 71; ----------------------------------GFX10-------------------------------------- 72; RUN: llc -mtriple=amdgcn-amd-amdhsa --amdhsa-code-object-version=6 -mcpu=gfx10-3-generic -filetype=obj -O0 -o %t.o %s 73; RUN: llvm-objdump -D --arch-name=amdgcn -mllvm --amdhsa-code-object-version=6 --mcpu=gfx10-3-generic %t.o > %t-specify.txt 74; RUN: llvm-objdump -D -mllvm --amdhsa-code-object-version=6 %t.o > %t-detect.txt 75; RUN: diff %t-specify.txt %t-detect.txt 76 77; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1036 -filetype=obj -O0 -o %t.o %s 78; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1036 %t.o > %t-specify.txt 79; RUN: llvm-objdump -D %t.o > %t-detect.txt 80; RUN: diff %t-specify.txt %t-detect.txt 81 82; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1035 -filetype=obj -O0 -o %t.o %s 83; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1035 %t.o > %t-specify.txt 84; RUN: llvm-objdump -D %t.o > %t-detect.txt 85; RUN: diff %t-specify.txt %t-detect.txt 86 87; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1034 -filetype=obj -O0 -o %t.o %s 88; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1034 %t.o > %t-specify.txt 89; RUN: llvm-objdump -D %t.o > %t-detect.txt 90; RUN: diff %t-specify.txt %t-detect.txt 91 92; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1033 -filetype=obj -O0 -o %t.o %s 93; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1033 %t.o > %t-specify.txt 94; RUN: llvm-objdump -D %t.o > %t-detect.txt 95; RUN: diff %t-specify.txt %t-detect.txt 96 97; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1032 -filetype=obj -O0 -o %t.o %s 98; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1032 %t.o > %t-specify.txt 99; RUN: llvm-objdump -D %t.o > %t-detect.txt 100; RUN: diff %t-specify.txt %t-detect.txt 101 102; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1031 -filetype=obj -O0 -o %t.o %s 103; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1031 %t.o > %t-specify.txt 104; RUN: llvm-objdump -D %t.o > %t-detect.txt 105; RUN: diff %t-specify.txt %t-detect.txt 106 107; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1030 -filetype=obj -O0 -o %t.o %s 108; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1030 %t.o > %t-specify.txt 109; RUN: llvm-objdump -D %t.o > %t-detect.txt 110; RUN: diff %t-specify.txt %t-detect.txt 111 112; RUN: llc -mtriple=amdgcn-amd-amdhsa --amdhsa-code-object-version=6 -mcpu=gfx10-1-generic -filetype=obj -O0 -o %t.o %s 113; RUN: llvm-objdump -D --arch-name=amdgcn -mllvm --amdhsa-code-object-version=6 --mcpu=gfx10-1-generic %t.o > %t-specify.txt 114; RUN: llvm-objdump -D -mllvm --amdhsa-code-object-version=6 %t.o > %t-detect.txt 115; RUN: diff %t-specify.txt %t-detect.txt 116 117; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1013 -filetype=obj -O0 -o %t.o %s 118; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1013 %t.o > %t-specify.txt 119; RUN: llvm-objdump -D %t.o > %t-detect.txt 120; RUN: diff %t-specify.txt %t-detect.txt 121 122; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1012 -filetype=obj -O0 -o %t.o %s 123; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1012 %t.o > %t-specify.txt 124; RUN: llvm-objdump -D %t.o > %t-detect.txt 125; RUN: diff %t-specify.txt %t-detect.txt 126 127; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1011 -filetype=obj -O0 -o %t.o %s 128; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1011 %t.o > %t-specify.txt 129; RUN: llvm-objdump -D %t.o > %t-detect.txt 130; RUN: diff %t-specify.txt %t-detect.txt 131 132; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1010 -filetype=obj -O0 -o %t.o %s 133; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1010 %t.o > %t-specify.txt 134; RUN: llvm-objdump -D %t.o > %t-detect.txt 135; RUN: diff %t-specify.txt %t-detect.txt 136 137 138; ----------------------------------GFX9--------------------------------------- 139; 140; RUN: llc -mtriple=amdgcn-amd-amdhsa --amdhsa-code-object-version=6 -mcpu=gfx9-4-generic -filetype=obj -O0 -o %t.o %s 141; RUN: llvm-objdump -D --arch-name=amdgcn -mllvm --amdhsa-code-object-version=6 --mcpu=gfx9-4-generic %t.o > %t-specify.txt 142; RUN: llvm-objdump -D -mllvm --amdhsa-code-object-version=6 %t.o > %t-detect.txt 143; RUN: diff %t-specify.txt %t-detect.txt 144 145; RUN: llc -mtriple=amdgcn-amd-amdhsa --amdhsa-code-object-version=6 -mcpu=gfx9-generic -filetype=obj -O0 -o %t.o %s 146; RUN: llvm-objdump -D --arch-name=amdgcn -mllvm --amdhsa-code-object-version=6 --mcpu=gfx9-generic %t.o > %t-specify.txt 147; RUN: llvm-objdump -D -mllvm --amdhsa-code-object-version=6 %t.o > %t-detect.txt 148; RUN: diff %t-specify.txt %t-detect.txt 149 150; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx950 -filetype=obj -O0 -o %t.o %s 151; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx950 %t.o > %t-specify.txt 152; RUN: llvm-objdump -D %t.o > %t-detect.txt 153; RUN: diff %t-specify.txt %t-detect.txt 154 155; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx942 -filetype=obj -O0 -o %t.o %s 156; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx942 %t.o > %t-specify.txt 157; RUN: llvm-objdump -D %t.o > %t-detect.txt 158; RUN: diff %t-specify.txt %t-detect.txt 159 160; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx941 -filetype=obj -O0 -o %t.o %s 161; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx941 %t.o > %t-specify.txt 162; RUN: llvm-objdump -D %t.o > %t-detect.txt 163; RUN: diff %t-specify.txt %t-detect.txt 164 165; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx940 -filetype=obj -O0 -o %t.o %s 166; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx940 %t.o > %t-specify.txt 167; RUN: llvm-objdump -D %t.o > %t-detect.txt 168; RUN: diff %t-specify.txt %t-detect.txt 169 170; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90c -filetype=obj -O0 -o %t.o %s 171; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx90c %t.o > %t-specify.txt 172; RUN: llvm-objdump -D %t.o > %t-detect.txt 173; RUN: diff %t-specify.txt %t-detect.txt 174 175; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90a -filetype=obj -O0 -o %t.o %s 176; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx90a %t.o > %t-specify.txt 177; RUN: llvm-objdump -D %t.o > %t-detect.txt 178; RUN: diff %t-specify.txt %t-detect.txt 179 180; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx909 -filetype=obj -O0 -o %t.o %s 181; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx909 %t.o > %t-specify.txt 182; RUN: llvm-objdump -D %t.o > %t-detect.txt 183; RUN: diff %t-specify.txt %t-detect.txt 184 185; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx908 -filetype=obj -O0 -o %t.o %s 186; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx908 %t.o > %t-specify.txt 187; RUN: llvm-objdump -D %t.o > %t-detect.txt 188; RUN: diff %t-specify.txt %t-detect.txt 189 190; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx906 -filetype=obj -O0 -o %t.o %s 191; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx906 %t.o > %t-specify.txt 192; RUN: llvm-objdump -D %t.o > %t-detect.txt 193; RUN: diff %t-specify.txt %t-detect.txt 194 195; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx904 -filetype=obj -O0 -o %t.o %s 196; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx904 %t.o > %t-specify.txt 197; RUN: llvm-objdump -D %t.o > %t-detect.txt 198; RUN: diff %t-specify.txt %t-detect.txt 199 200; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx902 -filetype=obj -O0 -o %t.o %s 201; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx902 %t.o > %t-specify.txt 202; RUN: llvm-objdump -D %t.o > %t-detect.txt 203; RUN: diff %t-specify.txt %t-detect.txt 204 205; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -filetype=obj -O0 -o %t.o %s 206; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx900 %t.o > %t-specify.txt 207; RUN: llvm-objdump -D %t.o > %t-detect.txt 208; RUN: diff %t-specify.txt %t-detect.txt 209 210 211; ----------------------------------GFX8--------------------------------------- 212; 213; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx810 -filetype=obj -O0 -o %t.o %s 214; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx810 %t.o > %t-specify.txt 215; RUN: llvm-objdump -D %t.o > %t-detect.txt 216; RUN: diff %t-specify.txt %t-detect.txt 217 218; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803 -filetype=obj -O0 -o %t.o %s 219; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx803 %t.o > %t-specify.txt 220; RUN: llvm-objdump -D %t.o > %t-detect.txt 221; RUN: diff %t-specify.txt %t-detect.txt 222 223; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx802 -filetype=obj -O0 -o %t.o %s 224; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx802 %t.o > %t-specify.txt 225; RUN: llvm-objdump -D %t.o > %t-detect.txt 226; RUN: diff %t-specify.txt %t-detect.txt 227 228; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx801 -filetype=obj -O0 -o %t.o %s 229; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx801 %t.o > %t-specify.txt 230; RUN: llvm-objdump -D %t.o > %t-detect.txt 231; RUN: diff %t-specify.txt %t-detect.txt 232