[PATCH] D33995: InferAddressSpaces: Avoid crash with replacing identical cloned constexpr

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 7 09:10:36 PDT 2017


arsenm added a comment.

I'm not sure I see why this would crash?



================
Comment at: test/Transforms/InferAddressSpaces/NVPTX/clone_constexpr.ll:3-4
+
+target datalayout = "e-i64:64-v16:16-v32:32-n16:32:64"
+target triple = "nvptx64-nvidia-cuda"
+
----------------
Should remove these since they are redundant with the opt argument


================
Comment at: test/Transforms/InferAddressSpaces/NVPTX/clone_constexpr.ll:23
+entry:
+  %0 = tail call i32 @llvm.nvvm.read.ptx.sreg.tid.x() #2, !range !4
+  %idxprom.i = zext i32 %0 to i64
----------------
Name values


================
Comment at: test/Transforms/InferAddressSpaces/NVPTX/clone_constexpr.ll:41-43
+!nvvm.annotations = !{!0}
+!llvm.module.flags = !{!1, !2}
+!llvm.ident = !{!3}
----------------
You should be able to remove all the metadata in the test


================
Comment at: test/Transforms/InferAddressSpaces/NVPTX/clone_constexpr.ll:41-53
+!nvvm.annotations = !{!0}
+!llvm.module.flags = !{!1, !2}
+!llvm.ident = !{!3}
+
+!0 = !{void ()* @foo, !"kernel", i32 1}
+!1 = !{i32 1, !"wchar_size", i32 4}
+!2 = !{i32 4, !"nvvm-reflect-ftz", i32 0}
----------------
arsenm wrote:
> You should be able to remove all the metadata in the test
You should be able to remove all the metadata in the test


https://reviews.llvm.org/D33995





More information about the llvm-commits mailing list