llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-flang-openmp Author: Krzysztof Drewniak (krzysz00) <details> <summary>Changes</summary> - `FeatureAtomitFaddNoRtnInsts` is needed to control when atomic emulation for buffer operations happens - `FeatureBackOffBarrier` controls an inline-assembly workaround for LDS-only barriers on old gfx9 - `FeatureLfsBarrierArriveAtomic` is a precise flag compared to arch versions - `FeatureORPFP8ConversionInsts` controls which MLIR FP8 types can be lowered to LLVM - `FeaturePermlane16Insts`is another feature check Clang and flang tests are updated since they look at the feature set AI disclosure: Claude made these changes, I wrote this message --- Full diff: https://github.com/llvm/llvm-project/pull/223561.diff 3 Files Affected: - (modified) clang/test/CodeGen/link-builtin-bitcode.c (+3-3) - (modified) flang/test/Lower/OpenMP/target_cpu_features.f90 (+1-1) - (modified) llvm/lib/Target/AMDGPU/AMDGPU.td (+8-6) ``````````diff diff --git a/clang/test/CodeGen/link-builtin-bitcode.c b/clang/test/CodeGen/link-builtin-bitcode.c index 2cae7c027a4f3..9fcd0dccad12f 100644 --- a/clang/test/CodeGen/link-builtin-bitcode.c +++ b/clang/test/CodeGen/link-builtin-bitcode.c @@ -44,6 +44,6 @@ int bar() { return no_attr() + attr_in_target() + attr_not_in_target() + attr_in // CHECK-SAME: () #[[ATTR_INCOMPATIBLE:[0-9]+]] { // CHECK: attributes #[[ATTR_BAR]] = { {{.*}} "no-trapping-math"="true" {{.*}} } -// CHECK: attributes #[[ATTR_COMPATIBLE]] = { {{.*}} "target-features"="+16-bit-insts,+atomic-buffer-global-pk-add-f16-insts,+atomic-fadd-rtn-insts,+atomic-fmin-fmax-global-f64,+ci-insts,+cube-insts,+cvt-pknorm-vop2-insts,+dl-insts,+dot1-insts,+dot10-insts,+dot2-insts,+dot3-insts,+dot4-insts,+dot5-insts,+dot6-insts,+dot7-insts,+dpp,+flat-buffer-global-fadd-f64-inst,+flat-global-insts,+gfx8-insts,+gfx9-insts,+gfx90a-insts,+gws,+image-insts,+lerp-inst,+mai-insts,+mqsad-insts,+mqsad-pk-insts,+msad-insts,+qsad-insts,+s-memrealtime,+s-memtime-inst,+sad-insts,+vmem-to-lds-load-insts,+wavefrontsize64" } -// CHECK: attributes #[[ATTR_EXTEND]] = { {{.*}} "target-features"="+16-bit-insts,+atomic-buffer-global-pk-add-f16-insts,+atomic-fadd-rtn-insts,+atomic-fmin-fmax-global-f64,+ci-insts,+cube-insts,+cvt-pknorm-vop2-insts,+dl-insts,+dot1-insts,+dot10-insts,+dot2-insts,+dot3-insts,+dot4-insts,+dot5-insts,+dot6-insts,+dot7-insts,+dot8-insts,+dpp,+flat-buffer-global-fadd-f64-inst,+flat-global-insts,+gfx8-insts,+gfx9-insts,+gfx90a-insts,+gws,+image-insts,+lerp-inst,+mai-insts,+mqsad-insts,+mqsad-pk-insts,+msad-insts,+qsad-insts,+s-memrealtime,+s-memtime-inst,+sad-insts,+vmem-to-lds-load-insts,+wavefrontsize64" } -// CHECK: attributes #[[ATTR_INCOMPATIBLE]] = { {{.*}} "target-features"="+16-bit-insts,+atomic-buffer-global-pk-add-f16-insts,+atomic-fadd-rtn-insts,+atomic-fmin-fmax-global-f64,+ci-insts,+cube-insts,+cvt-pknorm-vop2-insts,+dl-insts,+dot1-insts,+dot10-insts,+dot2-insts,+dot3-insts,+dot4-insts,+dot5-insts,+dot6-insts,+dot7-insts,+dpp,+flat-buffer-global-fadd-f64-inst,+flat-global-insts,+gfx8-insts,+gfx90a-insts,+gws,+image-insts,+lerp-inst,+mai-insts,+mqsad-insts,+mqsad-pk-insts,+msad-insts,+qsad-insts,+s-memrealtime,+s-memtime-inst,+sad-insts,+vmem-to-lds-load-insts,+wavefrontsize64,-gfx9-insts" } +// CHECK: attributes #[[ATTR_COMPATIBLE]] = { {{.*}} "target-features"="+16-bit-insts,+atomic-buffer-global-pk-add-f16-insts,+atomic-fadd-no-rtn-insts,+atomic-fadd-rtn-insts,+atomic-fmin-fmax-global-f64,+back-off-barrier,+ci-insts,+cube-insts,+cvt-pknorm-vop2-insts,+dl-insts,+dot1-insts,+dot10-insts,+dot2-insts,+dot3-insts,+dot4-insts,+dot5-insts,+dot6-insts,+dot7-insts,+dpp,+flat-buffer-global-fadd-f64-inst,+flat-global-insts,+gfx8-insts,+gfx9-insts,+gfx90a-insts,+gws,+image-insts,+lerp-inst,+mai-insts,+mqsad-insts,+mqsad-pk-insts,+msad-insts,+qsad-insts,+s-memrealtime,+s-memtime-inst,+sad-insts,+vmem-to-lds-load-insts,+wavefrontsize64" } +// CHECK: attributes #[[ATTR_EXTEND]] = { {{.*}} "target-features"="+16-bit-insts,+atomic-buffer-global-pk-add-f16-insts,+atomic-fadd-no-rtn-insts,+atomic-fadd-rtn-insts,+atomic-fmin-fmax-global-f64,+back-off-barrier,+ci-insts,+cube-insts,+cvt-pknorm-vop2-insts,+dl-insts,+dot1-insts,+dot10-insts,+dot2-insts,+dot3-insts,+dot4-insts,+dot5-insts,+dot6-insts,+dot7-insts,+dot8-insts,+dpp,+flat-buffer-global-fadd-f64-inst,+flat-global-insts,+gfx8-insts,+gfx9-insts,+gfx90a-insts,+gws,+image-insts,+lerp-inst,+mai-insts,+mqsad-insts,+mqsad-pk-insts,+msad-insts,+qsad-insts,+s-memrealtime,+s-memtime-inst,+sad-insts,+vmem-to-lds-load-insts,+wavefrontsize64" } +// CHECK: attributes #[[ATTR_INCOMPATIBLE]] = { {{.*}} "target-features"="+16-bit-insts,+atomic-buffer-global-pk-add-f16-insts,+atomic-fadd-no-rtn-insts,+atomic-fadd-rtn-insts,+atomic-fmin-fmax-global-f64,+back-off-barrier,+ci-insts,+cube-insts,+cvt-pknorm-vop2-insts,+dl-insts,+dot1-insts,+dot10-insts,+dot2-insts,+dot3-insts,+dot4-insts,+dot5-insts,+dot6-insts,+dot7-insts,+dpp,+flat-buffer-global-fadd-f64-inst,+flat-global-insts,+gfx8-insts,+gfx90a-insts,+gws,+image-insts,+lerp-inst,+mai-insts,+mqsad-insts,+mqsad-pk-insts,+msad-insts,+qsad-insts,+s-memrealtime,+s-memtime-inst,+sad-insts,+vmem-to-lds-load-insts,+wavefrontsize64,-gfx9-insts" } diff --git a/flang/test/Lower/OpenMP/target_cpu_features.f90 b/flang/test/Lower/OpenMP/target_cpu_features.f90 index 78f29b23068af..96ac924afb488 100644 --- a/flang/test/Lower/OpenMP/target_cpu_features.f90 +++ b/flang/test/Lower/OpenMP/target_cpu_features.f90 @@ -8,7 +8,7 @@ !AMDGCN: module attributes { !AMDGCN-SAME: fir.target_cpu = "gfx908" -!AMDGCN-SAME: fir.target_features = #llvm.target_features<["+16-bit-insts", "+ci-insts", +!AMDGCN-SAME: fir.target_features = #llvm.target_features<["+16-bit-insts", "+atomic-fadd-no-rtn-insts", "+ci-insts", !AMDGCN-SAME: "+dl-insts", "+dot1-insts", "+dot10-insts", "+dot2-insts", "+dot3-insts", !AMDGCN-SAME: "+dot4-insts", "+dot5-insts", "+dot6-insts", "+dot7-insts", "+dpp", !AMDGCN-SAME: "+gfx8-insts", "+gfx9-insts", "+gws", "+image-insts", "+lerp-inst", "+mai-insts", diff --git a/llvm/lib/Target/AMDGPU/AMDGPU.td b/llvm/lib/Target/AMDGPU/AMDGPU.td index 30db12b565082..b7b63146277ab 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPU.td +++ b/llvm/lib/Target/AMDGPU/AMDGPU.td @@ -3228,8 +3228,9 @@ def AMDGPUFrontendVisibleFeatures { Feature16BitInsts, FeatureAddMinMaxInsts, FeatureAshrPkInsts, FeatureAsyncLoadToLDSInsts, FeatureAsyncStoreFromLDSInsts, FeatureAsynccnt, FeatureAtomicBufferGlobalPkAddF16Insts, FeatureAtomicBufferPkAddBF16Inst, FeatureAtomicDsPkAdd16Insts, - FeatureAtomicFMinFMaxF32GlobalInsts, FeatureAtomicFMinFMaxF64GlobalInsts, FeatureAtomicFaddRtnInsts, - FeatureAtomicFlatPkAdd16Insts, FeatureAtomicGlobalPkAddBF16Inst, FeatureBF16ConversionInsts, + FeatureAtomicFMinFMaxF32GlobalInsts, FeatureAtomicFMinFMaxF64GlobalInsts, FeatureAtomicFaddNoRtnInsts, + FeatureAtomicFaddRtnInsts, FeatureAtomicFlatPkAdd16Insts, FeatureAtomicGlobalPkAddBF16Inst, + FeatureBF16ConversionInsts, FeatureBF16PackedInsts, FeatureBF16TransInsts, FeatureBF8ConversionScaleInsts, FeatureBVHRayTracingInsts, FeatureBitOp3Insts, FeatureCIInsts, FeatureClusters, FeatureCubeInsts, FeatureCvtPkNormVOP2Insts, @@ -3247,9 +3248,10 @@ def AMDGPUFrontendVisibleFeatures { FeatureGFX1250Insts, FeatureGFX1251GEMMInsts, FeatureGFX12Insts, FeatureGFX13Insts, FeatureGFX8Insts, FeatureGFX90AInsts, FeatureGFX940Insts, FeatureGFX950Insts, FeatureGFX9Insts, - FeatureGWS, FeatureImageInsts, FeatureLerpInst, - FeatureMAIInsts, FeatureMcastLoadInsts, FeatureMqsadInsts, - FeatureMqsadPkInsts, FeatureMsadInsts, FeaturePermlane16Swap, + FeatureGWS, FeatureImageInsts, FeatureLdsBarrierArriveAtomic, + FeatureLerpInst, FeatureMAIInsts, FeatureMcastLoadInsts, + FeatureMqsadInsts, FeatureMqsadPkInsts, FeatureMsadInsts, + FeatureOCPFP8ConversionInsts, FeaturePermlane16Insts, FeaturePermlane16Swap, FeaturePermlane32Swap, FeaturePkAddMinMaxInsts, FeaturePrngInst, FeatureQsadInsts, FeatureSMemRealTime, FeatureSMemTimeInst, FeatureSWMMACGfx1200Insts, FeatureSWMMACGfx1250Insts, FeatureSWakeupBarrier, @@ -3262,7 +3264,7 @@ def AMDGPUFrontendVisibleFeatures { FeatureSupportsXNACK, FeatureSupportsSRAMECC, FeatureXNACKOnOffModes, FeatureSGPRInitBug, FeatureApertureRegs, FeatureGetDoorbellID, FeatureAGPRAlloc, Feature1536VGPRs, Feature1024AddressableVGPRs, - FeatureHalfAddressablePhysicalLocalMemory, + FeatureHalfAddressablePhysicalLocalMemory, FeatureBackOffBarrier, ]; } `````````` </details> https://github.com/llvm/llvm-project/pull/223561 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
