[PATCH] D99589: [test, InferFunctionAttrs] Fix use of var defined in CHECK-NOT
Artem Belevich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 30 09:27:19 PDT 2021
tra added inline comments.
================
Comment at: llvm/test/Transforms/InferFunctionAttrs/annotate.ll:244
; CHECK-UNKNOWN-NOT: declare i32 @bcmp(i8* nocapture, i8* nocapture, i64) [[NOFREE_NOUNWIND_READONLY]]
-; CHECK-NVPTX-NOT: declare i32 @bcmp(i8* nocapture, i8* nocapture, i64) [[NOFREE_NOUNWIND_READONLY]]
+; CHECK-NVPTX-NOT: declare i32 @bcmp(i8* nocapture, i8* nocapture, i64) #{{[0-9]+}}
declare i32 @bcmp(i8*, i8*, i64)
----------------
I don't think this test does what it's supposed to do for nvptx.
The `CHECK-NVPTX: attributes` will match at the end of the IR and this check will be looking for the function declarations way past the point where they were, so it will never trigger, even if NVPTX does declare bcmp with the wrong arguments.
You need to move the `CHECK-NVPTX: attributes` from line 9 to the end of this file.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99589/new/
https://reviews.llvm.org/D99589
More information about the llvm-commits
mailing list