Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions llvm/test/Transforms/WholeProgramDevirt/import.ll
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,25 @@
; RUN: opt -S -passes=wholeprogramdevirt -wholeprogramdevirt-summary-action=import -wholeprogramdevirt-read-summary=%S/Inputs/import-branch-funnel.yaml < %s | FileCheck --check-prefixes=CHECK,BRANCH-FUNNEL,BRANCH-FUNNEL-NOVCP %s

; Cutoff value is not explicitly set. Expect 3 remark messages.
; RUN: opt -S -passes=wholeprogramdevirt -wholeprogramdevirt-summary-action=import -pass-remarks=wholeprogramdevirt -wholeprogramdevirt-read-summary=%S/Inputs/import-single-impl.yaml < %s 2>&1 | grep "single-impl" | count 3
; RUN: opt -S -passes=wholeprogramdevirt \
; RUN: -wholeprogramdevirt-summary-action=import \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I normally find two space indentation for additional parts of command on new lines to be more readable.

; RUN: -pass-remarks=wholeprogramdevirt \
; RUN: -wholeprogramdevirt-read-summary=%S/Inputs/import-single-impl.yaml \
; RUN: < %s 2>&1 | grep "single-impl" | count 3
;
; Cutoff value is set to 1. Expect one remark messages.
; RUN: opt -S -passes=wholeprogramdevirt -wholeprogramdevirt-summary-action=import -pass-remarks=wholeprogramdevirt -wholeprogramdevirt-cutoff=1 -wholeprogramdevirt-read-summary=%S/Inputs/import-single-impl.yaml < %s 2>&1 | grep "single-impl" | count 1
; RUN: opt -S -passes=wholeprogramdevirt \
; RUN: -wholeprogramdevirt-summary-action=import -pass-remarks=wholeprogramdevirt \
; RUN: -wholeprogramdevirt-cutoff=1 \
; RUN: -wholeprogramdevirt-read-summary=%S/Inputs/import-single-impl.yaml < %s \
; RUN: 2>&1 | grep "single-impl" | count 1
;
; Cutoff value is explicitly set to zero. Expect no remark message.
; RUN: opt -S -passes=wholeprogramdevirt -wholeprogramdevirt-summary-action=import -pass-remarks=wholeprogramdevirt -wholeprogramdevirt-cutoff=0 -wholeprogramdevirt-read-summary=%S/Inputs/import-single-impl.yaml < %s 2>&1 | FileCheck -implicit-check-not="remark" %s
; RUN: opt -S -passes=wholeprogramdevirt \
; RUN: -wholeprogramdevirt-summary-action=import \
; RUN: -pass-remarks=wholeprogramdevirt -wholeprogramdevirt-cutoff=0 \
; RUN: -wholeprogramdevirt-read-summary=%S/Inputs/import-single-impl.yaml \
; RUN: < %s 2>&1 | FileCheck -implicit-check-not="remark" %s
target datalayout = "e-p:64:64"
target triple = "x86_64-unknown-linux-gnu"

Expand Down