-; RUN: opt -S < %s | FileCheck %s --check-prefixes=ALL,FIRST
-; RUN: opt -S -globalopt < %s | FileCheck %s --check-prefixes=ALL,SECOND
+; RUN: opt -S < %s | FileCheck %s --check-prefixes=ALL,ALL_BUT_TWO,ALL_BUT_THREE,ALL_BUT_FOUR,ONE_AND_TWO,ONE_AND_THREE,ONE_AND_FOUR,ONE
+; RUN: opt -S -globalopt < %s | FileCheck %s --check-prefixes=ALL,ALL_BUT_ONE,ALL_BUT_THREE,ALL_BUT_FOUR,ONE_AND_TWO,TWO_AND_THREE,TWO_AND_FOUR,TWO
+; RUN: opt -S -instsimplify < %s | FileCheck %s --check-prefixes=ALL,ALL_BUT_ONE,ALL_BUT_TWO,ALL_BUT_FOUR,ONE_AND_THREE,TWO_AND_THREE,THREE_AND_FOUR,THREE
+; RUN: opt -S < %s | FileCheck %s --check-prefixes=ALL,ALL_BUT_ONE,ALL_BUT_TWO,ALL_BUT_THREE,ONE_AND_FOUR,TWO_AND_FOUR,THREE_AND_FOUR,FOUR
;
-; Make sure we use FIRST to check for @sometimes_here as ALL does not work.
+; Make sure we don't use anything to check for @sometimes_here that contains "ALL" or "TWO".
+; Also verify we use "ONE_AND_FOUR" for the unmodified @sometimes_here version and "THREE" for the version without the add.
define internal void @sometimes_here() {
+ %c = add i32 undef, undef
ret void
}
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S < %s | FileCheck %s --check-prefixes=ALL,FIRST
-; RUN: opt -S -globalopt < %s | FileCheck %s --check-prefixes=ALL,SECOND
+; RUN: opt -S < %s | FileCheck %s --check-prefixes=ALL,ALL_BUT_TWO,ALL_BUT_THREE,ALL_BUT_FOUR,ONE_AND_TWO,ONE_AND_THREE,ONE_AND_FOUR,ONE
+; RUN: opt -S -globalopt < %s | FileCheck %s --check-prefixes=ALL,ALL_BUT_ONE,ALL_BUT_THREE,ALL_BUT_FOUR,ONE_AND_TWO,TWO_AND_THREE,TWO_AND_FOUR,TWO
+; RUN: opt -S -instsimplify < %s | FileCheck %s --check-prefixes=ALL,ALL_BUT_ONE,ALL_BUT_TWO,ALL_BUT_FOUR,ONE_AND_THREE,TWO_AND_THREE,THREE_AND_FOUR,THREE
+; RUN: opt -S < %s | FileCheck %s --check-prefixes=ALL,ALL_BUT_ONE,ALL_BUT_TWO,ALL_BUT_THREE,ONE_AND_FOUR,TWO_AND_FOUR,THREE_AND_FOUR,FOUR
;
-; Make sure we use FIRST to check for @sometimes_here as ALL does not work.
+; Make sure we don't use anything to check for @sometimes_here that contains "ALL" or "TWO".
+; Also verify we use "ONE_AND_FOUR" for the unmodified @sometimes_here version and "THREE" for the version without the add.
define internal void @sometimes_here() {
-; FIRST-LABEL: @sometimes_here(
-; FIRST-NEXT: ret void
+; ONE_AND_FOUR-LABEL: @sometimes_here(
+; ONE_AND_FOUR-NEXT: [[C:%.*]] = add i32 undef, undef
+; ONE_AND_FOUR-NEXT: ret void
;
+; THREE-LABEL: @sometimes_here(
+; THREE-NEXT: ret void
+;
+ %c = add i32 undef, undef
ret void
}
# prefix_blacklist is constructed, we can now emit the output
for p in prefix_list:
checkprefixes = p[0]
- saved_output = None
for checkprefix in checkprefixes:
if checkprefix in printed_prefixes:
break
- # prefix is blacklisted. We remember the output as we might need it later but we will not emit anything for the prefix.
+ # Check if the prefix is blacklisted.
if checkprefix in prefix_blacklist:
- if not saved_output and func_name in func_dict[checkprefix]:
- saved_output = func_dict[checkprefix][func_name]
- continue
+ continue
- # If we do not have output for this prefix but there is one saved, we go ahead with this prefix and the saved output.
+ # If we do not have output for this prefix we skip it.
if not func_dict[checkprefix][func_name]:
- if not saved_output:
- continue
- func_dict[checkprefix][func_name] = saved_output
+ continue
# Add some space between different check prefixes, but not after the last
# check line (before the test code).