|
| 1 | +;=========================== begin_copyright_notice ============================ |
| 2 | +; |
| 3 | +; Copyright (C) 2024 Intel Corporation |
| 4 | +; |
| 5 | +; SPDX-License-Identifier: MIT |
| 6 | +; |
| 7 | +;============================ end_copyright_notice ============================= |
| 8 | +; REQUIRES: llvm-14-plus, regkeys |
| 9 | +; RUN: igc_opt --opaque-pointers --regkey PrintToConsole --CheckInstrTypes -igc-serialize-metadata --enable-instrtypes-print -S < %s 2>&1 | FileCheck %s |
| 10 | +; ------------------------------------------------ |
| 11 | +; CheckInstrTypes |
| 12 | +; ------------------------------------------------ |
| 13 | + |
| 14 | +; Test checks metrics gathered by CheckInstrTypes pass |
| 15 | + |
| 16 | +define void @test(ptr addrspace(3) %addr) { |
| 17 | +entry: |
| 18 | + %dummy = call i32 @llvm.genx.GenISA.intatomicrawA64.i32.p3i32.p3i32(ptr addrspace(3) %addr, ptr addrspace(3) %addr, i32 0, i32 9) |
| 19 | + ret void |
| 20 | +} |
| 21 | + |
| 22 | +; Test checks metrics gathered by CheckInstrTypes pass |
| 23 | + |
| 24 | +; CHECK: CorrelatedValuePropagationEnable: 0 |
| 25 | +; CHECK: hasMultipleBB: 0 |
| 26 | +; CHECK: hasCmp: 0 |
| 27 | +; CHECK: hasSwitch: 0 |
| 28 | +; CHECK: hasPhi: 0 |
| 29 | +; CHECK: hasLoadStore: 0 |
| 30 | +; CHECK: hasIndirectCall: 0 |
| 31 | +; CHECK: hasInlineAsm: 0 |
| 32 | +; CHECK: hasInlineAsmPointerAccess: 0 |
| 33 | +; CHECK: hasIndirectBranch: 0 |
| 34 | +; CHECK: hasFunctionAddressTaken: 0 |
| 35 | +; CHECK: hasSel: 0 |
| 36 | +; CHECK: hasPointer: 0 |
| 37 | +; CHECK: hasLocalLoadStore: 0 |
| 38 | +; CHECK: hasGlobalLoad: 0 |
| 39 | +; CHECK: hasGlobalStore: 0 |
| 40 | +; CHECK: hasStorageBufferLoad: 0 |
| 41 | +; CHECK: hasStorageBufferStore: 0 |
| 42 | +; CHECK: hasSubroutines: 0 |
| 43 | +; CHECK: hasPrimitiveAlloca: 0 |
| 44 | +; CHECK: hasNonPrimitiveAlloca: 0 |
| 45 | +; CHECK: hasReadOnlyArray: 0 |
| 46 | +; CHECK: hasBuiltin: 0 |
| 47 | +; CHECK: hasFRem: 0 |
| 48 | +; CHECK: psHasSideEffect: 1 |
| 49 | +; CHECK: hasGenericAddressSpacePointers: 0 |
| 50 | +; CHECK: hasDebugInfo: 0 |
| 51 | +; CHECK: hasAtomics: 1 |
| 52 | +; CHECK: hasLocalAtomics: 1 |
| 53 | +; CHECK: hasDiscard: 0 |
| 54 | +; CHECK: hasTypedRead: 0 |
| 55 | +; CHECK: hasTypedwrite: 0 |
| 56 | +; CHECK: mayHaveIndirectOperands: 0 |
| 57 | +; CHECK: mayHaveIndirectResources: 0 |
| 58 | +; CHECK: hasUniformAssumptions: 0 |
| 59 | +; CHECK: sampleCmpToDiscardOptimizationPossible: 0 |
| 60 | +; CHECK: hasRuntimeValueVector: 0 |
| 61 | +; CHECK: hasDynamicGenericLoadStore: 0 |
| 62 | +; CHECK: hasUnmaskedRegion: 0 |
| 63 | +; CHECK: hasSLM: 0 |
| 64 | +; CHECK: numCall: 1 |
| 65 | +; CHECK: numBarrier: 0 |
| 66 | +; CHECK: numLoadStore: 0 |
| 67 | +; CHECK: numWaveIntrinsics: 0 |
| 68 | +; CHECK: numAtomics: 1 |
| 69 | +; CHECK: numTypedReadWrite: 0 |
| 70 | +; CHECK: numAllInsts: 2 |
| 71 | +; CHECK: sampleCmpToDiscardOptimizationSlot: 0 |
| 72 | +; CHECK: numSample: 0 |
| 73 | +; CHECK: numBB: 1 |
| 74 | +; CHECK: numLoopInsts: 0 |
| 75 | +; CHECK: numOfLoop: 0 |
| 76 | +; CHECK: numInsts: 2 |
| 77 | +; CHECK: numAllocaInsts: 0 |
| 78 | +; CHECK: numPsInputs: 0 |
| 79 | +; CHECK: hasPullBary: 0 |
| 80 | +; CHECK: numGlobalInsts: 0 |
| 81 | +; CHECK: numLocalInsts: 2 |
| 82 | +; CHECK: numSamplesVaryingResource: 0 |
| 83 | +; CHECK: numUntyped: 0 |
| 84 | +; CHECK: num1DAccesses: 0 |
| 85 | +; CHECK: num2DAccesses: 0 |
| 86 | +; CHECK: numSLMAccesses: 0 |
| 87 | + |
| 88 | +; Function Attrs: argmemonly nounwind |
| 89 | +declare i32 @llvm.genx.GenISA.intatomicrawA64.i32.p3i32.p3i32(ptr addrspace(3), ptr addrspace(3), i32, i32) #2 |
| 90 | + |
| 91 | +attributes #0 = { null_pointer_is_valid } |
| 92 | +attributes #1 = { nounwind readnone } |
| 93 | +attributes #2 = { argmemonly nounwind } |
| 94 | + |
| 95 | +!IGCMetadata = !{!1} |
| 96 | + |
| 97 | +!1 = !{!"ModuleMD"} |
0 commit comments