[PATCH] D152251: [clang][CodeGen] Fix GPU-specific attributes being dropped by bitcode linking
Pierre van Houtryve via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 6 04:32:53 PDT 2023
Pierre-vh updated this revision to Diff 528793.
Pierre-vh marked 3 inline comments as done.
Pierre-vh added a comment.
target-cpu wasn't set so I tried something a bit different, but now I still need to remove the target-cpu check in the old test.
For some reason filecheck doesn't match it but it's there?
/home/pierre/work/trunk/llvm-project/clang/test/CodeGenCUDA/link-builtin-bitcode-denormal-fp-mode.cu:150:28: error: IEEEF32-PSZF64-DYNFULL: expected string not found in input
// IEEEF32-PSZF64-DYNFULL: #[[$FUNCATTR]] = { {{.*}} "denormal-fp-math"="preserve-sign,preserve-sign" "denormal-fp-math-f32"="ieee,ieee" {{.*}} "target-cpu"="gfx803" {{.*}} }
^
<stdin>:260:427: note: scanning from here
attributes #0 = { convergent mustprogress noinline norecurse nounwind optnone "amdgpu-flat-work-group-size"="1,1024" "denormal-fp-math"="preserve-sign,preserve-sign" "denormal-fp-math-f32"="ieee,ieee" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="gfx803" "target-features"="+16-bit-insts,+ci-insts,+dpp,+gfx8-insts,+s-memrealtime,+s-memtime-inst,+wavefrontsize64" "uniform-work-group-size"="true" }
^
<stdin>:260:427: note: with "$FUNCATTR" equal to "1"
attributes #0 = { convergent mustprogress noinline norecurse nounwind optnone "amdgpu-flat-work-group-size"="1,1024" "denormal-fp-math"="preserve-sign,preserve-sign" "denormal-fp-math-f32"="ieee,ieee" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="gfx803" "target-features"="+16-bit-insts,+ci-insts,+dpp,+gfx8-insts,+s-memrealtime,+s-memtime-inst,+wavefrontsize64" "uniform-work-group-size"="true" }
^
<stdin>:261:85: note: possible intended match here
attributes #1 = { convergent mustprogress nofree norecurse nosync nounwind willreturn memory(none) "denormal-fp-math"="preserve-sign,preserve-sign" "denormal-fp-math-f32"="ieee,ieee" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="gfx803" }
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152251/new/
https://reviews.llvm.org/D152251
Files:
clang/lib/CodeGen/CGCall.cpp
clang/lib/CodeGen/CodeGenModule.cpp
clang/lib/CodeGen/CodeGenModule.h
clang/test/CodeGenCUDA/Inputs/ocml-sample-target-attrs.cl
clang/test/CodeGenCUDA/link-builtin-bitcode-denormal-fp-mode.cu
clang/test/CodeGenCUDA/link-builtin-bitcode-gpu-attrs-preserved.cu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152251.528793.patch
Type: text/x-patch
Size: 9126 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230606/5dbd5590/attachment.bin>
More information about the cfe-commits
mailing list