[PATCH] D110720: Verify inferattrs doesn't infer unexpected attributes
Ryan Prichard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 29 19:00:31 PDT 2021
rprichard added a comment.
The dereferenceable.ll and dereferenceable-inseltpoison.ll files are also confusing to me. It *sounds* like they're trying to test inferred attributes, but its CHECK* lines would allow any or no attributes on the functions, so it's not actually testing anything attribute-related.
Using --match-full-lines seems fine to me, and this change does look like an improvement.
================
Comment at: llvm/test/Transforms/InferFunctionAttrs/annotate.ll:4
+; RUN: opt < %s -mtriple=x86_64-apple-macosx10.8.0 -inferattrs -S | FileCheck --match-full-lines --check-prefixes=CHECK,CHECK-KNOWN,CHECK-NOLINUX,CHECK-NONVPTX,CHECK-DARWIN %s
+; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -inferattrs -S | FileCheck --match-full-lines --check-prefixes=CHECK,CHECK-KNOWN,CHECK-LINUX %s
+; RUN: opt < %s -mtriple=nvptx -inferattrs -S | FileCheck --match-full-lines --check-prefixes=CHECK-NOLINUX,CHECK-NVPTX %s
----------------
Linux isn't nvptx, but it's not passing CHECK-NONVPTX.
Then again, all of the tests pass CHECK, except for the nvptx case. I tested FileCheck, and it seems that CHECK is not implicitly tested when `--check-prefixes` is specified. So, for nvptx, we were previously only testing `__nvvm_reflect` and `bcmp`?
The lines where CHECK is split into CHECK-LINUX and CHECK-NOLINUX are also enabling the test for nvptx.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110720/new/
https://reviews.llvm.org/D110720
More information about the llvm-commits
mailing list