summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/MIR/AMDGPU
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2019-12-09 17:07:14 +0530
committerMatt Arsenault <arsenm2@gmail.com>2020-01-07 10:10:25 -0500
commitf26ed6e47cb8b080c236d11c4942a12265180084 (patch)
treea45cd666e9495669e5e2471e5258bce395217a26 /llvm/test/CodeGen/MIR/AMDGPU
parenta428386d4a805f94299e5013805ddd4a2114f5f5 (diff)
downloadbcm5719-llvm-f26ed6e47cb8b080c236d11c4942a12265180084.tar.gz
bcm5719-llvm-f26ed6e47cb8b080c236d11c4942a12265180084.zip
llc: Change behavior of -mcpu with existing attribute
Don't overwrite existing target-cpu attributes. I've often found the replacement behavior annoying, and this is inconsistent with how the fast math command line flags interact with the function attributes. Does not yet change target-features, since I think that should behave as a concatenation.
Diffstat (limited to 'llvm/test/CodeGen/MIR/AMDGPU')
-rw-r--r--llvm/test/CodeGen/MIR/AMDGPU/llc-target-cpu-attr-from-cmdline-ir.mir7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/MIR/AMDGPU/llc-target-cpu-attr-from-cmdline-ir.mir b/llvm/test/CodeGen/MIR/AMDGPU/llc-target-cpu-attr-from-cmdline-ir.mir
index 588c9a5df78..ccbc4ed8779 100644
--- a/llvm/test/CodeGen/MIR/AMDGPU/llc-target-cpu-attr-from-cmdline-ir.mir
+++ b/llvm/test/CodeGen/MIR/AMDGPU/llc-target-cpu-attr-from-cmdline-ir.mir
@@ -4,8 +4,11 @@
# FIXME: This overrides attributes that already are present. It should probably
# only touch functions without an existing attribute.
-# MCPU: attributes #0 = { "target-cpu"="hawaii" }
-# MCPU-NOT: attributes #1
+# MCPU: @with_cpu_attr() #0 {
+# MCPU: @no_cpu_attr() #1 {
+
+# MCPU: attributes #0 = { "target-cpu"="fiji" }
+# MCPU: attributes #1 = { "target-cpu"="hawaii" }
# MATTR: attributes #0 = { "target-cpu"="fiji" "target-features"="+unaligned-buffer-access" }
# MATTR: attributes #1 = { "target-features"="+unaligned-buffer-access" }
OpenPOWER on IntegriCloud