llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-backend-systemz Author: Nikita Popov (nikic) <details> <summary>Changes</summary> Unlike Attributor, FunctionAttrs currently only supports inferring nofree on functions. This PR adds support for inferring it on arguments as well. I've chosen to integrate this with the inference for readnone/readonly/writeonly attributes, as the core logic for these is the same. --- Patch is 3.45 MiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/201591.diff 175 Files Affected: - (modified) clang/test/CodeGen/AArch64/ls64-inline-asm.c (+21-21) - (modified) clang/test/CodeGen/AArch64/pure-scalable-args.c (+5-5) - (modified) clang/test/CodeGen/AArch64/sve-acle-__ARM_FEATURE_SVE_VECTOR_OPERATORS.c (+1-1) - (modified) clang/test/CodeGen/LoongArch/lasx/builtin-alias.c (+2749-2749) - (modified) clang/test/CodeGen/LoongArch/lasx/builtin-approximate-alias.c (+15-15) - (modified) clang/test/CodeGen/LoongArch/lasx/builtin-approximate.c (+15-15) - (modified) clang/test/CodeGen/LoongArch/lasx/builtin.c (+2745-2745) - (modified) clang/test/CodeGen/PowerPC/builtins-dmf-vsx-vector-float.c (+164-164) - (modified) clang/test/CodeGen/PowerPC/builtins-ppc-amo.c (+68-68) - (modified) clang/test/CodeGen/PowerPC/builtins-ppc-build-pair-mma.c (+20-20) - (modified) clang/test/CodeGen/PowerPC/builtins-ppc-dmf.c (+46-46) - (modified) clang/test/CodeGen/PowerPC/builtins-ppc-pair-mma.c (+209-209) - (modified) clang/test/CodeGen/RISCV/attr-rvv-vector-bits-bitcast-less-8.c (+11-11) - (modified) clang/test/CodeGen/RISCV/attr-rvv-vector-bits-bitcast.c (+45-45) - (modified) clang/test/CodeGen/RISCV/attr-rvv-vector-bits-cast.c (+11-11) - (modified) clang/test/CodeGen/RISCV/bitint.c (+96-96) - (modified) clang/test/CodeGen/SystemZ/gnu-atomic-builtins-i128-16Al.c (+55-55) - (modified) clang/test/CodeGen/SystemZ/gnu-atomic-builtins-i128-8Al.c (+55-55) - (modified) clang/test/CodeGen/SystemZ/sync-builtins-i128-16Al.c (+57-57) - (modified) clang/test/CodeGen/SystemZ/systemz-inline-asm.c (+1-1) - (modified) clang/test/CodeGen/allow-ubsan-check.c (+143-143) - (modified) clang/test/CodeGen/arm-cmse-attr.c (+2-2) - (modified) clang/test/CodeGen/arm-vfp16-arguments.c (+1-1) - (modified) clang/test/CodeGen/arm-vfp16-arguments2.cpp (+5-5) - (modified) clang/test/CodeGen/attr-arm-sve-vector-bits-bitcast.c (+57-57) - (modified) clang/test/CodeGen/attr-arm-sve-vector-bits-cast.c (+11-11) - (modified) clang/test/CodeGen/attr-counted-by-for-pointers.c (+143-143) - (modified) clang/test/CodeGen/attr-counted-by-pr110385.c (+9-9) - (modified) clang/test/CodeGen/attr-counted-by.c (+628-628) - (modified) clang/test/CodeGen/cfi-check-fail2-nomerge.c (+64-58) - (modified) clang/test/CodeGen/glibc_ptr_align.c (+2-2) - (modified) clang/test/CodeGen/isfpclass.c (+6-6) - (modified) clang/test/CodeGen/math-libcalls-tbaa-indirect-args.c (+9-9) - (modified) clang/test/CodeGen/math-libcalls-tbaa.c (+38-38) - (modified) clang/test/CodeGen/nofpclass.c (+14-14) - (modified) clang/test/CodeGen/pointer-arithmetic-align.c (+15-15) - (modified) clang/test/CodeGen/sanitize-metadata-nosanitize.c (+4-4) - (modified) clang/test/CodeGen/tbaa-struct-bitfield-endianness.cpp (+1-1) - (modified) clang/test/CodeGen/transparent-union-type.c (+3-3) - (modified) clang/test/CodeGen/union-tbaa1.c (+15-15) - (modified) clang/test/CodeGenCUDA/amdgpu-kernel-arg-pointer-type.cu (+13-13) - (modified) clang/test/CodeGenCXX/RelativeVTablesABI/dynamic-cast.cpp (+4-4) - (modified) clang/test/CodeGenCXX/RelativeVTablesABI/type-info.cpp (+1-1) - (modified) clang/test/CodeGenCXX/bitfield-ir.cpp (+9-9) - (modified) clang/test/CodeGenCXX/inline-then-fold-variadics.cpp (+15-15) - (modified) clang/test/CodeGenCXX/wasm-args-returns.cpp (+1-1) - (modified) clang/test/CodeGenHIP/amdgcnspirv-uses-amdgpu-abi.cpp (+30-30) - (modified) clang/test/CodeGenOpenCL/amdgcn-buffer-rsrc-type.cl (+12-12) - (modified) clang/test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl (+20-20) - (modified) clang/test/CodeGenOpenCL/amdgpu-call-kernel.cl (+1-1) - (modified) clang/test/CodeGenOpenCL/as_type.cl (+1-1) - (modified) clang/test/CodeGenOpenCL/atomic-builtins-default-to-device-scope.cl (+34-34) - (modified) clang/test/CodeGenOpenCL/builtins-amdgcn-gfx12-wmma-w32.cl (+25-25) - (modified) clang/test/CodeGenOpenCL/builtins-amdgcn-gfx12-wmma-w64.cl (+25-25) - (modified) clang/test/CodeGenOpenCL/builtins-amdgcn-gfx1250-async-load-store-lds.cl (+18-18) - (modified) clang/test/CodeGenOpenCL/builtins-amdgcn-gfx1250-cooperative-atomics.cl (+20-20) - (modified) clang/test/CodeGenOpenCL/builtins-amdgcn-gfx950-read-tr.cl (+6-6) - (modified) clang/test/CodeGenOpenCL/builtins-amdgcn-raw-buffer-atomic-add.cl (+3-3) - (modified) clang/test/CodeGenOpenCL/builtins-amdgcn-raw-buffer-atomic-max.cl (+2-2) - (modified) clang/test/CodeGenOpenCL/builtins-amdgcn-swmmac-w32.cl (+25-25) - (modified) clang/test/CodeGenOpenCL/builtins-amdgcn-swmmac-w64.cl (+25-25) - (modified) clang/test/CodeGenOpenCL/builtins-amdgcn-wmma-w32.cl (+19-19) - (modified) clang/test/CodeGenOpenCL/builtins-amdgcn-wmma-w64.cl (+19-19) - (modified) clang/test/CodeGenOpenCL/builtins-amdgcn-workgroup-size.cl (+6-6) - (modified) clang/test/CodeGenOpenCL/kernel-param-alignment.cl (+6-6) - (modified) clang/test/CodeGenOpenCL/kernels-have-spir-cc-by-default.cl (+4-4) - (modified) clang/test/CodeGenOpenCL/preserve_vec3.cl (+38-38) - (modified) clang/test/CodeGenOpenCLCXX/array-type-infinite-loop.clcpp (+11-11) - (modified) clang/test/CodeGenSPIRV/Builtins/generic_cast_to_ptr_explicit.c (+3-3) - (modified) clang/test/DebugInfo/Generic/cfi-icall-generalize-debuginfo.c (+88-88) - (modified) clang/test/DebugInfo/Generic/ubsan-function-debuginfo.c (+50-50) - (modified) clang/test/Headers/__clang_hip_math.hip (+93-94) - (modified) clang/test/Headers/wasm.c (+47-47) - (modified) clang/test/OpenMP/bug54082.c (+31-31) - (modified) clang/test/OpenMP/taskloop_strictmodifier_codegen.cpp (+109-109) - (modified) llvm/lib/Transforms/IPO/FunctionAttrs.cpp (+64-53) - (modified) llvm/test/Analysis/TypeBasedAliasAnalysis/functionattrs.ll (+4-4) - (modified) llvm/test/CodeGen/AMDGPU/amdgpu-libcall-sincos-pass-ordering.ll (+2-2) - (modified) llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-sincos.ll (+54-54) - (modified) llvm/test/CodeGen/AMDGPU/amdgpu-simplify-uniform-waterfall.ll (+16-16) - (modified) llvm/test/CodeGen/AMDGPU/amdgpu-uniform-intrinsic-combine.ll (+27-27) - (modified) llvm/test/CodeGen/AMDGPU/inline-attr.ll (+4-4) - (modified) llvm/test/CodeGen/BPF/loop-exit-cond.ll (+1-1) - (modified) llvm/test/CodeGen/BPF/preserve-static-offset/load-inline.ll (+1-1) - (modified) llvm/test/CodeGen/BPF/preserve-static-offset/load-unroll-inline.ll (+1-1) - (modified) llvm/test/CodeGen/BPF/preserve-static-offset/load-unroll.ll (+1-1) - (modified) llvm/test/CodeGen/BPF/preserve-static-offset/store-align.ll (+1-1) - (modified) llvm/test/CodeGen/BPF/preserve-static-offset/store-atomic.ll (+1-1) - (modified) llvm/test/CodeGen/BPF/preserve-static-offset/store-chain-oob.ll (+1-1) - (modified) llvm/test/CodeGen/BPF/preserve-static-offset/store-chain-u8-oob.ll (+1-1) - (modified) llvm/test/CodeGen/BPF/preserve-static-offset/store-chain-u8.ll (+1-1) - (modified) llvm/test/CodeGen/BPF/preserve-static-offset/store-chain.ll (+1-1) - (modified) llvm/test/CodeGen/BPF/preserve-static-offset/store-simple.ll (+1-1) - (modified) llvm/test/CodeGen/BPF/preserve-static-offset/store-unroll-inline.ll (+1-1) - (modified) llvm/test/CodeGen/BPF/preserve-static-offset/store-volatile.ll (+1-1) - (modified) llvm/test/CodeGen/BPF/preserve-static-offset/store-zero.ll (+1-1) - (modified) llvm/test/Feature/OperandBundles/function-attrs.ll (+1-1) - (modified) llvm/test/LTO/X86/mix-opaque-typed.ll (+1-1) - (modified) llvm/test/Other/cgscc-devirt-iteration.ll (+2-2) - (modified) llvm/test/Other/optimize-inrange-gep.ll (+1-1) - (modified) llvm/test/Transforms/Coroutines/coro-async.ll (+3-3) - (modified) llvm/test/Transforms/FunctionAttrs/2009-01-02-LocalStores.ll (+2-2) - (modified) llvm/test/Transforms/FunctionAttrs/arg_returned.ll (+15-15) - (modified) llvm/test/Transforms/FunctionAttrs/argmemonly.ll (+32-45) - (modified) llvm/test/Transforms/FunctionAttrs/atomic.ll (+12-12) - (modified) llvm/test/Transforms/FunctionAttrs/convergent.ll (+2-2) - (modified) llvm/test/Transforms/FunctionAttrs/initializes.ll (+35-35) - (modified) llvm/test/Transforms/FunctionAttrs/make-buffer-rsrc.ll (+1-1) - (modified) llvm/test/Transforms/FunctionAttrs/noalias.ll (+3-3) - (modified) llvm/test/Transforms/FunctionAttrs/nocapture.ll (+49-49) - (modified) llvm/test/Transforms/FunctionAttrs/nofpclass.ll (+17-17) - (modified) llvm/test/Transforms/FunctionAttrs/nofree.ll (+123-5) - (modified) llvm/test/Transforms/FunctionAttrs/nonnull.ll (+21-21) - (modified) llvm/test/Transforms/FunctionAttrs/norecurse.ll (+4-4) - (modified) llvm/test/Transforms/FunctionAttrs/noundef.ll (+4-4) - (modified) llvm/test/Transforms/FunctionAttrs/nounwind.ll (+4-4) - (modified) llvm/test/Transforms/FunctionAttrs/optnone.ll (+1-1) - (modified) llvm/test/Transforms/FunctionAttrs/out-of-bounds-iterator-bug.ll (+2-2) - (modified) llvm/test/Transforms/FunctionAttrs/readattrs.ll (+21-21) - (modified) llvm/test/Transforms/FunctionAttrs/readnone.ll (+2-2) - (modified) llvm/test/Transforms/FunctionAttrs/stats.ll (+1) - (modified) llvm/test/Transforms/FunctionAttrs/writeonly.ll (+18-24) - (modified) llvm/test/Transforms/InstCombine/unused-nonnull.ll (+2-2) - (modified) llvm/test/Transforms/LoopUnroll/unroll-cleanup.ll (+3-3) - (modified) llvm/test/Transforms/PhaseOrdering/AArch64/Oz-and-forced-vectorize.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/AArch64/block_scaling_decompr_8bit.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/AArch64/constraint-elimination-placement.ll (+3-3) - (modified) llvm/test/Transforms/PhaseOrdering/AArch64/extra-unroll-simplifications.ll (+2-2) - (modified) llvm/test/Transforms/PhaseOrdering/AArch64/hoist-load-from-vector-loop.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/AArch64/hoist-runtime-checks.ll (+4-4) - (modified) llvm/test/Transforms/PhaseOrdering/AArch64/indvars-vectorization.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/AArch64/infer-align-from-assumption.ll (+7-7) - (modified) llvm/test/Transforms/PhaseOrdering/AArch64/interleave_vec.ll (+11-11) - (modified) llvm/test/Transforms/PhaseOrdering/AArch64/loop-rotate-to-enable-unrolling-and-vectorization.ll (+2-2) - (modified) llvm/test/Transforms/PhaseOrdering/AArch64/memcpy-constant-size.ll (+2-2) - (modified) llvm/test/Transforms/PhaseOrdering/AArch64/predicated-reduction.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/AArch64/quant_4x4.ll (+32-32) - (modified) llvm/test/Transforms/PhaseOrdering/AArch64/reduce_muladd.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/AArch64/reduce_submuladd.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/AArch64/scalarize-load-ext-extract.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/AArch64/sinking-vs-if-conversion.ll (+2-2) - (modified) llvm/test/Transforms/PhaseOrdering/AArch64/slpordering.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/AArch64/trunc-intrinsics.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/AArch64/udotabd.ll (+2-2) - (modified) llvm/test/Transforms/PhaseOrdering/AMDGPU/infer-address-space.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/RISCV/any-of-vectorization.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/SystemZ/sub-xor.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/X86/SROA-after-final-loop-unrolling-2.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/X86/hoist-load-of-baseptr.ll (+3-3) - (modified) llvm/test/Transforms/PhaseOrdering/X86/loop-vectorizer-noalias.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/X86/madd.ll (+13-13) - (modified) llvm/test/Transforms/PhaseOrdering/X86/pr88239.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/X86/preserve-access-group.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/X86/sad.ll (+4-4) - (modified) llvm/test/Transforms/PhaseOrdering/X86/speculation-vs-tbaa.ll (+2-2) - (modified) llvm/test/Transforms/PhaseOrdering/X86/spurious-peeling.ll (+2-2) - (modified) llvm/test/Transforms/PhaseOrdering/X86/unroll-vectorizer.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/X86/vdiv-nounroll.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/X86/vdiv.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/always-inline-alloca-promotion.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/bitcast-store-branch.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/branch-dom-cond.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/dce-after-argument-promotion-loads.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/early-arg-attrs-inference.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/enable-loop-header-duplication-oz.ll (+2-2) - (modified) llvm/test/Transforms/PhaseOrdering/gvn-replacement-vs-hoist.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/loop-access-checks.ll (+3-3) - (modified) llvm/test/Transforms/PhaseOrdering/lto-argpromotion-ipsccp.ll (+2-2) - (modified) llvm/test/Transforms/PhaseOrdering/memcpy-offset.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/phi-protected-field-ptr.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/pr95152.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/pr98799-inline-simplifycfg-ub.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/struct-to-vector-before-memcpyopt.ll (+1-1) - (modified) llvm/test/Transforms/PhaseOrdering/switch_with_geps.ll (+2-2) - (modified) llvm/test/Transforms/SimpleLoopUnswitch/AMDGPU/uniform-unswitch.ll (+2-2) ``````````diff diff --git a/clang/test/CodeGen/AArch64/ls64-inline-asm.c b/clang/test/CodeGen/AArch64/ls64-inline-asm.c index 04e2207357817..94bc3b08918d7 100644 --- a/clang/test/CodeGen/AArch64/ls64-inline-asm.c +++ b/clang/test/CodeGen/AArch64/ls64-inline-asm.c @@ -4,9 +4,9 @@ struct foo { unsigned long long x[8]; }; // CHECK-LABEL: define dso_local void @load( -// CHECK-SAME: ptr noundef writeonly captures(none) initializes((0, 64)) [[OUTPUT:%.*]], ptr noundef [[ADDR:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] { +// CHECK-SAME: ptr nofree noundef writeonly captures(none) initializes((0, 64)) [[OUTPUT:%.*]], ptr noundef [[ADDR:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] { // CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = tail call i512 asm sideeffect "ld64b $0,[$1]", "=r,r,~{memory}"(ptr [[ADDR]]) #[[ATTR1:[0-9]+]], !srcloc [[META6:![0-9]+]] +// CHECK-NEXT: [[TMP0:%.*]] = tail call i512 asm sideeffect "ld64b $0,[$1]", "=r,r,~{memory}"(ptr [[ADDR]]) #[[ATTR1:[0-9]+]], !srcloc [[META5:![0-9]+]] // CHECK-NEXT: store i512 [[TMP0]], ptr [[OUTPUT]], align 8 // CHECK-NEXT: ret void // @@ -16,10 +16,10 @@ void load(struct foo *output, void *addr) } // CHECK-LABEL: define dso_local void @store( -// CHECK-SAME: ptr noundef readonly captures(none) [[INPUT:%.*]], ptr noundef [[ADDR:%.*]]) local_unnamed_addr #[[ATTR0]] { +// CHECK-SAME: ptr nofree noundef readonly captures(none) [[INPUT:%.*]], ptr noundef [[ADDR:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = load i512, ptr [[INPUT]], align 8 -// CHECK-NEXT: tail call void asm sideeffect "st64b $0,[$1]", "r,r,~{memory}"(i512 [[TMP0]], ptr [[ADDR]]) #[[ATTR1]], !srcloc [[META7:![0-9]+]] +// CHECK-NEXT: tail call void asm sideeffect "st64b $0,[$1]", "r,r,~{memory}"(i512 [[TMP0]], ptr [[ADDR]]) #[[ATTR1]], !srcloc [[META6:![0-9]+]] // CHECK-NEXT: ret void // void store(const struct foo *input, void *addr) @@ -28,30 +28,30 @@ void store(const struct foo *input, void *addr) } // CHECK-LABEL: define dso_local void @store2( -// CHECK-SAME: ptr noundef readonly captures(none) [[IN:%.*]], ptr noundef [[ADDR:%.*]]) local_unnamed_addr #[[ATTR0]] { +// CHECK-SAME: ptr nofree noundef readonly captures(none) [[IN:%.*]], ptr noundef [[ADDR:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load i32, ptr [[IN]], align 4, !tbaa [[INT_TBAA2:![0-9]+]] +// CHECK-NEXT: [[TMP0:%.*]] = load i32, ptr [[IN]], align 4, !tbaa [[INT_TBAA1:![0-9]+]] // CHECK-NEXT: [[CONV:%.*]] = sext i32 [[TMP0]] to i64 // CHECK-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds nuw i8, ptr [[IN]], i64 4 -// CHECK-NEXT: [[TMP1:%.*]] = load i32, ptr [[ARRAYIDX1]], align 4, !tbaa [[INT_TBAA2]] +// CHECK-NEXT: [[TMP1:%.*]] = load i32, ptr [[ARRAYIDX1]], align 4, !tbaa [[INT_TBAA1]] // CHECK-NEXT: [[CONV2:%.*]] = sext i32 [[TMP1]] to i64 // CHECK-NEXT: [[ARRAYIDX4:%.*]] = getelementptr inbounds nuw i8, ptr [[IN]], i64 16 -// CHECK-NEXT: [[TMP2:%.*]] = load i32, ptr [[ARRAYIDX4]], align 4, !tbaa [[INT_TBAA2]] +// CHECK-NEXT: [[TMP2:%.*]] = load i32, ptr [[ARRAYIDX4]], align 4, !tbaa [[INT_TBAA1]] // CHECK-NEXT: [[CONV5:%.*]] = sext i32 [[TMP2]] to i64 // CHECK-NEXT: [[ARRAYIDX7:%.*]] = getelementptr inbounds nuw i8, ptr [[IN]], i64 64 -// CHECK-NEXT: [[TMP3:%.*]] = load i32, ptr [[ARRAYIDX7]], align 4, !tbaa [[INT_TBAA2]] +// CHECK-NEXT: [[TMP3:%.*]] = load i32, ptr [[ARRAYIDX7]], align 4, !tbaa [[INT_TBAA1]] // CHECK-NEXT: [[CONV8:%.*]] = sext i32 [[TMP3]] to i64 // CHECK-NEXT: [[ARRAYIDX10:%.*]] = getelementptr inbounds nuw i8, ptr [[IN]], i64 100 -// CHECK-NEXT: [[TMP4:%.*]] = load i32, ptr [[ARRAYIDX10]], align 4, !tbaa [[INT_TBAA2]] +// CHECK-NEXT: [[TMP4:%.*]] = load i32, ptr [[ARRAYIDX10]], align 4, !tbaa [[INT_TBAA1]] // CHECK-NEXT: [[CONV11:%.*]] = sext i32 [[TMP4]] to i64 // CHECK-NEXT: [[ARRAYIDX13:%.*]] = getelementptr inbounds nuw i8, ptr [[IN]], i64 144 -// CHECK-NEXT: [[TMP5:%.*]] = load i32, ptr [[ARRAYIDX13]], align 4, !tbaa [[INT_TBAA2]] +// CHECK-NEXT: [[TMP5:%.*]] = load i32, ptr [[ARRAYIDX13]], align 4, !tbaa [[INT_TBAA1]] // CHECK-NEXT: [[CONV14:%.*]] = sext i32 [[TMP5]] to i64 // CHECK-NEXT: [[ARRAYIDX16:%.*]] = getelementptr inbounds nuw i8, ptr [[IN]], i64 196 -// CHECK-NEXT: [[TMP6:%.*]] = load i32, ptr [[ARRAYIDX16]], align 4, !tbaa [[INT_TBAA2]] +// CHECK-NEXT: [[TMP6:%.*]] = load i32, ptr [[ARRAYIDX16]], align 4, !tbaa [[INT_TBAA1]] // CHECK-NEXT: [[CONV17:%.*]] = sext i32 [[TMP6]] to i64 // CHECK-NEXT: [[ARRAYIDX19:%.*]] = getelementptr inbounds nuw i8, ptr [[IN]], i64 256 -// CHECK-NEXT: [[TMP7:%.*]] = load i32, ptr [[ARRAYIDX19]], align 4, !tbaa [[INT_TBAA2]] +// CHECK-NEXT: [[TMP7:%.*]] = load i32, ptr [[ARRAYIDX19]], align 4, !tbaa [[INT_TBAA1]] // CHECK-NEXT: [[CONV20:%.*]] = sext i32 [[TMP7]] to i64 // CHECK-NEXT: [[S_SROA_10_0_INSERT_EXT:%.*]] = zext i64 [[CONV20]] to i512 // CHECK-NEXT: [[S_SROA_10_0_INSERT_SHIFT:%.*]] = shl nuw i512 [[S_SROA_10_0_INSERT_EXT]], 448 @@ -75,7 +75,7 @@ void store(const struct foo *input, void *addr) // CHECK-NEXT: [[S_SROA_0_0_INSERT_EXT:%.*]] = zext i64 [[CONV]] to i512 // CHECK-NEXT: [[S_SROA_0_0_INSERT_MASK:%.*]] = or disjoint i512 [[S_SROA_4_0_INSERT_MASK]], [[S_SROA_4_0_INSERT_SHIFT]] // CHECK-NEXT: [[S_SROA_0_0_INSERT_INSERT:%.*]] = or i512 [[S_SROA_0_0_INSERT_MASK]], [[S_SROA_0_0_INSERT_EXT]] -// CHECK-NEXT: tail call void asm sideeffect "st64b $0,[$1]", "r,r,~{memory}"(i512 [[S_SROA_0_0_INSERT_INSERT]], ptr [[ADDR]]) #[[ATTR1]], !srcloc [[META8:![0-9]+]] +// CHECK-NEXT: tail call void asm sideeffect "st64b $0,[$1]", "r,r,~{memory}"(i512 [[S_SROA_0_0_INSERT_INSERT]], ptr [[ADDR]]) #[[ATTR1]], !srcloc [[META7:![0-9]+]] // CHECK-NEXT: ret void // void store2(int *in, void *addr) @@ -84,11 +84,11 @@ void store2(int *in, void *addr) __asm__ volatile ("st64b %0,[%1]" : : "r" (s), "r" (addr) : "memory" ); } //. -// CHECK: [[INT_TBAA2]] = !{[[META3:![0-9]+]], [[META3]], i64 0} -// CHECK: [[META3]] = !{!"int", [[META4:![0-9]+]], i64 0} -// CHECK: [[META4]] = !{!"omnipotent char", [[META5:![0-9]+]], i64 0} -// CHECK: [[META5]] = !{!"Simple C/C++ TBAA"} -// CHECK: [[META6]] = !{i64 789} -// CHECK: [[META7]] = !{i64 1368} -// CHECK: [[META8]] = !{i64 5992} +// CHECK: [[INT_TBAA1]] = !{[[META2:![0-9]+]], [[META2]], i64 0} +// CHECK: [[META2]] = !{!"int", [[META3:![0-9]+]], i64 0} +// CHECK: [[META3]] = !{!"omnipotent char", [[META4:![0-9]+]], i64 0} +// CHECK: [[META4]] = !{!"Simple C/C++ TBAA"} +// CHECK: [[META5]] = !{i64 796} +// CHECK: [[META6]] = !{i64 1382} +// CHECK: [[META7]] = !{i64 6013} //. diff --git a/clang/test/CodeGen/AArch64/pure-scalable-args.c b/clang/test/CodeGen/AArch64/pure-scalable-args.c index d1b61d0c068ab..3380e3206e450 100644 --- a/clang/test/CodeGen/AArch64/pure-scalable-args.c +++ b/clang/test/CodeGen/AArch64/pure-scalable-args.c @@ -67,7 +67,7 @@ void test_argpass_simple(PST *p) { void argpass_simple_callee(PST); argpass_simple_callee(*p); } -// CHECK-AAPCS: define dso_local void @test_argpass_simple(ptr noundef readonly captures(none) %p) +// CHECK-AAPCS: define dso_local void @test_argpass_simple(ptr nofree noundef readonly captures(none) %p) // CHECK-AAPCS-NEXT: entry: // CHECK-AAPCS-NEXT: %0 = load <2 x i8>, ptr %p, align 16 // CHECK-AAPCS-NEXT: %cast.scalable = tail call <vscale x 2 x i8> @llvm.vector.insert.nxv2i8.v2i8(<vscale x 2 x i8> poison, <2 x i8> %0, i64 0) @@ -292,7 +292,7 @@ PST test_return(PST *p) { return *p; } // CHECK-AAPCS: define dso_local <{ <vscale x 16 x i1>, <vscale x 2 x double>, <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 16 x i8>, <vscale x 16 x i1> }> @test_return(ptr -// CHECK-DARWIN: define void @test_return(ptr dead_on_unwind noalias writable writeonly sret(%struct.PST) align 16 captures(none) initializes((0, 96)) %agg.result, ptr noundef readonly captures(none) %p) +// CHECK-DARWIN: define void @test_return(ptr dead_on_unwind noalias nofree writable writeonly sret(%struct.PST) align 16 captures(none) initializes((0, 96)) %agg.result, ptr nofree noundef readonly captures(none) %p) // Corner case of 1-element aggregate // p->x -> q0 @@ -300,7 +300,7 @@ SmallPST test_return_small_pst(SmallPST *p) { return *p; } // CHECK-AAPCS: define dso_local <vscale x 4 x float> @test_return_small_pst(ptr -// CHECK-DARWIN: define i128 @test_return_small_pst(ptr noundef readonly captures(none) %p) +// CHECK-DARWIN: define i128 @test_return_small_pst(ptr nofree noundef readonly captures(none) %p) // Big PST, returned indirectly @@ -308,8 +308,8 @@ SmallPST test_return_small_pst(SmallPST *p) { BigPST test_return_big_pst(BigPST *p) { return *p; } -// CHECK-AAPCS: define dso_local void @test_return_big_pst(ptr dead_on_unwind noalias writable writeonly sret(%struct.BigPST) align 16 captures(none) initializes((0, 176)) %agg.result, ptr noundef readonly captures(none) %p) -// CHECK-DARWIN: define void @test_return_big_pst(ptr dead_on_unwind noalias writable writeonly sret(%struct.BigPST) align 16 captures(none) initializes((0, 176)) %agg.result, ptr noundef readonly captures(none) %p) +// CHECK-AAPCS: define dso_local void @test_return_big_pst(ptr dead_on_unwind noalias nofree writable writeonly sret(%struct.BigPST) align 16 captures(none) initializes((0, 176)) %agg.result, ptr nofree noundef readonly captures(none) %p) +// CHECK-DARWIN: define void @test_return_big_pst(ptr dead_on_unwind noalias nofree writable writeonly sret(%struct.BigPST) align 16 captures(none) initializes((0, 176)) %agg.result, ptr nofree noundef readonly captures(none) %p) // Variadic arguments are unnamed, PST passed indirectly. // (Passing SVE types to a variadic function currently unsupported by diff --git a/clang/test/CodeGen/AArch64/sve-acle-__ARM_FEATURE_SVE_VECTOR_OPERATORS.c b/clang/test/CodeGen/AArch64/sve-acle-__ARM_FEATURE_SVE_VECTOR_OPERATORS.c index a6fa804022d64..c39e2e206130b 100644 --- a/clang/test/CodeGen/AArch64/sve-acle-__ARM_FEATURE_SVE_VECTOR_OPERATORS.c +++ b/clang/test/CodeGen/AArch64/sve-acle-__ARM_FEATURE_SVE_VECTOR_OPERATORS.c @@ -58,7 +58,7 @@ typedef int8_t vec_int8 __attribute__((vector_size(N / 8))); // CHECK128-NEXT: ret <16 x i8> [[CASTFIXEDSVE]] // CHECK-LABEL: define{{.*}} void @f2( -// CHECK-SAME: ptr dead_on_unwind noalias writable writeonly sret(<[[#div(VBITS,8)]] x i8>) align 16 captures(none) initializes((0, [[#div(VBITS,8)]])) %agg.result, ptr noundef readonly captures(none) dead_on_return %0) +// CHECK-SAME: ptr dead_on_unwind noalias nofree writable writeonly sret(<[[#div(VBITS,8)]] x i8>) align 16 captures(none) initializes((0, [[#div(VBITS,8)]])) %agg.result, ptr nofree noundef readonly captures(none) dead_on_return %0) // CHECK-NEXT: entry: // CHECK-NEXT: [[X:%.*]] = load <[[#div(VBITS,8)]] x i8>, ptr [[TMP0:%.*]], align 16, [[TBAA6:!tbaa !.*]] // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = tail call <vscale x 16 x i8> @llvm.vector.insert.nxv16i8.v[[#div(VBITS,8)]]i8(<vscale x 16 x i8> poison, <[[#div(VBITS,8)]] x i8> [[X]], i64 0) diff --git a/clang/test/CodeGen/LoongArch/lasx/builtin-alias.c b/clang/test/CodeGen/LoongArch/lasx/builtin-alias.c index 48278e1033ee7..259007046fe3d 100644 --- a/clang/test/CodeGen/LoongArch/lasx/builtin-alias.c +++ b/clang/test/CodeGen/LoongArch/lasx/builtin-alias.c @@ -4,7298 +4,7298 @@ #include <lasxintrin.h> // CHECK-LABEL: define dso_local void @xvsll_b( -// CHECK-SAME: ptr dead_on_unwind noalias writable writeonly sret(<32 x i8>) align 32 captures(none) initializes((0, 32)) [[AGG_RESULT:%.*]], ptr noundef readonly captures(none) dead_on_return [[TMP0:%.*]], ptr noundef readonly captures(none) dead_on_return [[TMP1:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] { +// CHECK-SAME: ptr dead_on_unwind noalias nofree writable writeonly sret(<32 x i8>) align 32 captures(none) initializes((0, 32)) [[AGG_RESULT:%.*]], ptr nofree noundef readonly captures(none) dead_on_return [[TMP0:%.*]], ptr nofree noundef readonly captures(none) dead_on_return [[TMP1:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] { // CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[_124:%.*]] = load <32 x i8>, ptr [[TMP0]], align 32, !tbaa [[CHAR_TBAA6:![0-9]+]] -// CHECK-NEXT: [[_235:%.*]] = load <32 x i8>, ptr [[TMP1]], align 32, !tbaa [[CHAR_TBAA6]] +// CHECK-NEXT: [[_124:%.*]] = load <32 x i8>, ptr [[TMP0]], align 32, !tbaa [[CHAR_TBAA5:![0-9]+]] +// CHECK-NEXT: [[_235:%.*]] = load <32 x i8>, ptr [[TMP1]], align 32, !tbaa [[CHAR_TBAA5]] // CHECK-NEXT: [[TMP2:%.*]] = tail call <32 x i8> @llvm.loongarch.lasx.xvsll.b(<32 x i8> [[_124]], <32 x i8> [[_235]]) -// CHECK-NEXT: store <32 x i8> [[TMP2]], ptr [[AGG_RESULT]], align 32, !tbaa [[CHAR_TBAA6]] +// CHECK-NEXT: store <32 x i8> [[TMP2]], ptr [[AGG_RESULT]], align 32, !tbaa [[CHAR_TBAA5]] // CHECK-NEXT: ret void // v32i8 xvsll_b(v32i8 _1, v32i8 _2) { return __lasx_xvsll_b(_1, _2); } // CHECK-LABEL: define dso_local void @xvsll_h( -// CHECK-SAME: ptr dead_on_unwind noalias writable writeonly sret(<16 x i16>) align 32 captures(none) initializes((0, 32)) [[AGG_RESULT:%.*]], ptr noundef readonly captures(none) dead_on_return [[TMP0:%.*]], ptr noundef readonly captures(none) dead_on_return [[TMP1:%.*]]) local_unnamed_addr #[[ATTR0]] { +// CHECK-SAME: ptr dead_on_unwind noalias nofree writable writeonly sret(<16 x i16>) align 32 captures(none) initializes((0, 32)) [[AGG_RESULT:%.*]], ptr nofree noundef readonly captures(none) dead_on_return [[TMP0:%.*]], ptr nofree noundef readonly captures(none) dead_on_return [[TMP1:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[_124:%.*]] = load <16 x i16>, ptr [[TMP0]], align 32, !tbaa [[CHAR_TBAA6]] -// CHECK-NEXT: [[_235:%.*]] = load <16 x i16>, ptr [[TMP1]], align 32, !tbaa [[CHAR_TBAA6]] +// CHECK-NEXT: [[_124:%.*]] = load <16 x i16>, ptr [[TMP0]], align 32, !tbaa [[CHAR_TBAA5]] +// CHECK-NEXT: [[_235:%.*]] = load <16 x i16>, ptr [[TMP1]], align 32, !tbaa [[CHAR_TBAA5]] // CHECK-NEXT: [[TMP2:%.*]] = tail call <16 x i16> @llvm.loongarch.lasx.xvsll.h(<16 x i16> [[_124]], <16 x i16> [[_235]]) -// CHECK-NEXT: store <16 x i16> [[TMP2]], ptr [[AGG_RESULT]], align 32, !tbaa [[CHAR_TBAA6]] +// CHECK-NEXT: store <16 x i16> [[TMP2]], ptr [[AGG_RESULT]], align 32, !tbaa [[CHAR_TBAA5]] // CHECK-NEXT: ret void // v16i16 xvsll_h(v16i16 _1, v16i16 _2) { return __lasx_xvsll_h(_1, _2); } // CHECK-LABEL: define dso_local void @xvsll_w( -// CHECK-SAME: ptr dead_on_unwind noalias writable writeonly sret(<8 x i32>) align 32 captures(none) initializes((0, 32)) [[AGG_RESULT:%.*]], ptr noundef readonly captures(none) dead_on_return [[TMP0:%.*]], ptr noundef readonly captures(none) dead_on_return [[TMP1:%.*]]) local_unnamed_addr #[[ATTR0]] { +// CHECK-SAME: ptr dead_on_unwind noalias nofree writable writeonly sret(<8 x i32>) align 32 captures(none) initializes((0, 32)) [[AGG_RESULT:%.*]], ptr nofree noundef readonly captures(none) dead_on_return [[TMP0:%.*]], ptr nofree noundef readonly captures(none) dead_on_return [[TMP1:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[_124:%.*]] = load <8 x i32>, ptr [[TMP0]], align 32, !tbaa [[CHAR_TBAA6]] -// CHECK-NEXT: [[_235:%.*]] = load <8 x i32>, ptr [[TMP1]], align 32, !tbaa [[CHAR_TBAA6]] +// CHECK-NEXT: [[_124:%.*]] = load <8 x i32>, ptr [[TMP0]], align 32, !tbaa [[CHAR_TBAA5]] +// CHECK-NEXT: [[_235:%.*]] = load <8 x i32>, ptr [[TMP1]], align 32, !tbaa [[CHAR_TBAA5]] // CHECK-NEXT: [[TMP2:%.*]] = tail call <8 x i32> @llvm.loongarch.lasx.xvsll.w(<8 x i32> [[_124]], <8 x i32> [[_235]]) -// CHECK-NEXT: store <8 x i32> [[TMP2]], ptr [[AGG_RESULT]], align 32, !tbaa [[CHAR_TBAA6]] +// CHECK-NEXT: store <8 x i32> [[TMP2]], ptr [[AGG_RESULT]], align 32, !tbaa [[CHAR_TBAA5]] // CHECK-NEXT: ret void // v8i32 xvsll_w(v8i32 _1, v8i32 _2) { return __lasx_xvsll_w(_1, _2); } // CHECK-LABEL: define dso_local void @xvsll_d( -// CHECK-SAME: ptr dead_on_unwind noalias writable writeonly sret(<4 x i64>) align 32 captures(none) initializes((0, 32)) [[AGG_RESULT:%.*]], ptr noundef readonly captures(none) dead_on_return [[TMP0:%.*]], ptr noundef readonly captures(none) dead_on_return [[TMP1:%.*]]) local_unnamed_addr #[[ATTR0]] { +// CHECK-SAME: ptr dead_on_unwind noalias nofree writable writeonly sret(<4 x i64>) align 32 captures(none) initializes((0, 32)) [[AGG_RESULT:%.*]], ptr nofree noundef readonly captures(none) dead_on_return [[TMP0:%.*]], ptr nofree noundef readonly captures(none) dead_on_return [[TMP1:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[_1:%.*]] = load <4 x i64>, ptr [[TMP0]], align 32, !tbaa [[CHAR_TBAA6]] -// CHECK-NEXT: [[_2:%.*]] = load <4 x i64>, ptr [[TMP1]], align 32, !tbaa [[CHAR_TBAA6]] +// CHECK-NEXT: [[_1:%.*]] = load <4 x i64>, ptr [[TMP0]], align 32, !tbaa [[CHAR_TBAA5]] +// CHECK-NEXT: [[_2:%.*]] = load <4 x i64>, ptr [[TMP1]], align 32, !tbaa [[CHAR_TBAA5]] // CHECK-NEXT: [[TMP2:%.*]] = tail call <4 x i64> @llvm.loongarch.lasx.xvsll.d(<4 x i64> [[_1]], <4 x i64> [[_2]]) -// CHECK-NEXT: store <4 x i64> [[TMP2]], ptr [[AGG_RESULT]], align 32, !tbaa [[CHAR_TBAA6]] +// CHECK-NEXT: store <4 x i64> [[TMP2]], ptr [[AGG_RESULT]], align 32, !tbaa [[CHAR_TBAA5]] // CHECK-NEXT: ret void // v4i64 xvsll_d(v4i64 _1, v4i64 _2) { return __lasx_xvsll_d(_1, _2); } // CHECK-LABEL: define dso_local void @xvslli_b( -// CHECK-SAME: ptr dead_on_unwind noalias writable writeonly sret(<32 x i8>) align 32 captures(none) initializes((0, 32)) [[AGG_RESULT:%.*]], ptr noundef readonly captures(none) dead_on_return [[TMP0:%.*]]) local_unnamed_addr #[[ATTR0]] { +// CHECK-SAME: ptr dead_on_unwind noalias nofree writable writeonly sret(<32 x i8>) align 32 captures(none) initializes((0, 32)) [[AGG_RESULT:%.*]], ptr nofree noundef readonly captures(none) dead_on_return [[TMP0:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[_1:%.*]] = load <32 x i8>, ptr [[TMP0]], align 32, !tbaa [[CHAR_TBAA6]] +// CHECK-NEXT: [[_1:%.*]] = load <32 x i8>, ptr [[TMP0]], align 32, !tbaa [[CHAR_TBAA5]] // CHECK-NEXT: [[TMP1:%.*]] = tail call <32 x i8> @llvm.loongarch.lasx.xvslli.b(<32 x i8> [[_1]], i32 1) -// CHECK-NEXT: store <32 x i8> [[TMP1]], ptr [[AGG_RESULT]], align 32, !tbaa [[CHAR_TBAA6]] +// CHECK-NEXT: store <32 x i8> [[TMP1]], ptr [[AGG_RESULT]], align 32, !tbaa [[CHAR_TBAA5]] // CHECK-NEXT: ret void // v32i8 xvslli_b(v32i8 _1) { return __lasx_xvslli_b(_1, 1); } // CHECK-LABEL: define dso_local void @xvslli_h( -// CHECK-SAME: ptr dead_on_unwind noalias writable writeonly sret(<16 x i16>) align 32 captures(none) initializes((0, 32)) [[AGG_RESULT:%.*]], ptr noundef readonly captures(none) dead_on_return [[TMP0:%.*]]) local_unnamed_addr #[[ATTR0]] { +// CHECK-SAME: ptr dead_on_unwind noalias nofree writable writeonly sret(<16 x i16>) align 32 captures(none) initializes((0, 32)) [[AGG_RESULT:%.*]], ptr nofree noundef readonly captures(none) dead_on_return [[TMP0:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[_1:%.*]] = load <16 x i16>, ptr [[TMP0]], align 32, !tbaa [[CHAR_TBAA6]] +// CHECK-NEXT: [[_1:%.*]] = load <16 x i16>, ptr [[TMP0]], align 32, !tbaa [[CHAR_TBAA5]] // CHECK-NEXT: [[TMP1:%.*]] = tail call <16 x i16> @llvm.loongarch.lasx.xvslli.h(<16 x i16> [[_1]], i32 1) -// CHECK-NEXT: store <16 x i16> [[TMP1]], ptr [[AGG_RESULT]], align 32, !tbaa [[CHAR_TBAA6]] +// CHECK-NEXT: store <16 x i16> [[TMP1]], ptr [[AGG_RESULT]], align 32, !tbaa [[CHAR_TBAA5]] // CHECK-NEXT: ret void // v16i16 xvslli_h(v16i16 _1) { return __lasx_xvslli_h(_1, 1); } // CHECK-LABEL: define dso_local void @xvslli_w( -// CHECK-SAME: ptr dead_on_unwind noalias writable writeonly sret(<8 x i32>) align 32 captures(none) initializes((0, 32)) [[AGG_RESULT:%.*]], ptr noundef readonly captures(none) dead_on_return [[TMP0:%.*]]) local_unnamed_addr #[[ATTR0]] { +// CHECK-SAME: ptr dead_on_unwind noalias nofree writable writeonly sret(<8 x i32>) align 32 captures(none) initializes((0, 32)) [[AGG_RESULT:%.*]], ptr nofree noundef readonly captures(none) dead_on_return [[TMP0:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT:... [truncated] `````````` </details> https://github.com/llvm/llvm-project/pull/201591 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
