summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2016-12-16 18:52:33 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2016-12-16 18:52:33 +0000
commit089c699743614cc99340c694454b4333c44d0198 (patch)
tree69da60047a32451224d356f72b076c54534d580c /llvm/test/Transforms
parentf624ec27b75701f1227eb03a44f3da84920c798d (diff)
downloadbcm5719-llvm-089c699743614cc99340c694454b4333c44d0198.tar.gz
bcm5719-llvm-089c699743614cc99340c694454b4333c44d0198.zip
Fix CodeGenPrepare::stripInvariantGroupMetadata
`dropUnknownNonDebugMetadata` takes a list of "known" metadata IDs. The only reason it worked at all is that `getMetadataID` returns something unrelated -- it returns the subclass ID of the receiver (which is used in `dyn_cast` etc.). That does not numerically match `LLVMContext::MD_invariant_group` and ends up dropping `invariant_group` along with every other metadata that does not numerically match `LLVMContext::MD_invariant_group`. llvm-svn: 289973
Diffstat (limited to 'llvm/test/Transforms')
-rw-r--r--llvm/test/Transforms/CodeGenPrepare/invariant.group.ll7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/test/Transforms/CodeGenPrepare/invariant.group.ll b/llvm/test/Transforms/CodeGenPrepare/invariant.group.ll
index e8f1e42ddcb..bde04a552df 100644
--- a/llvm/test/Transforms/CodeGenPrepare/invariant.group.ll
+++ b/llvm/test/Transforms/CodeGenPrepare/invariant.group.ll
@@ -7,8 +7,8 @@ define void @foo() {
enter:
; CHECK-NOT: !invariant.group
; CHECK-NOT: @llvm.invariant.group.barrier(
- ; CHECK: %val = load i8, i8* @tmp
- %val = load i8, i8* @tmp, !invariant.group !0
+ ; CHECK: %val = load i8, i8* @tmp, !tbaa
+ %val = load i8, i8* @tmp, !invariant.group !0, !tbaa !{!1, !1, i64 0}
%ptr = call i8* @llvm.invariant.group.barrier(i8* @tmp)
; CHECK: store i8 42, i8* @tmp
@@ -20,4 +20,5 @@ enter:
declare i8* @llvm.invariant.group.barrier(i8*)
-!0 = !{!"something"} \ No newline at end of file
+!0 = !{!"something"}
+!1 = !{!"x", !0}
OpenPOWER on IntegriCloud