llvm.org GIT mirror llvm / 69204ee
[test] Fix use of 'sort -b' in SimpleLoopUnswitch on NetBSD Add '-k 1' to 'sort -b' calls in SimpleLoopUnswitch tests, as required for sort implementation on NetBSD. The '-b' modifier is ineffective if specified without any key. Per the manpage: Note that the -b option has no effect unless key fields are specified. Differential Revision: https://reviews.llvm.org/D55168 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348097 91177308-0d34-0410-b5e6-96231b3b80d8 Michal Gorny 9 months ago
3 changed file(s) with 9 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
1717 ; RUN: opt < %s -enable-nontrivial-unswitch -enable-unswitch-cost-multiplier=true \
1818 ; RUN: -unswitch-num-initial-unscaled-candidates=4 -unswitch-siblings-toplevel-div=1 \
1919 ; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | \
20 ; RUN: sort -b | FileCheck %s --check-prefixes=LOOP-UNSCALE4-DIV1
20 ; RUN: sort -b -k 1 | FileCheck %s --check-prefixes=LOOP-UNSCALE4-DIV1
2121 ;
2222 ; NB: sort -b is essential here and below, otherwise blanks might lead to different
2323 ; order depending on locale.
2525 ; RUN: opt < %s -enable-nontrivial-unswitch -enable-unswitch-cost-multiplier=true \
2626 ; RUN: -unswitch-num-initial-unscaled-candidates=4 -unswitch-siblings-toplevel-div=2 \
2727 ; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | \
28 ; RUN: sort -b | FileCheck %s --check-prefixes=LOOP-UNSCALE4-DIV2
28 ; RUN: sort -b -k 1 | FileCheck %s --check-prefixes=LOOP-UNSCALE4-DIV2
2929 ;
3030 ;
3131 ; Get
3434 ;
3535 ; RUN: opt < %s -enable-nontrivial-unswitch -enable-unswitch-cost-multiplier=false \
3636 ; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | \
37 ; RUN: sort -b | FileCheck %s --check-prefixes=LOOP32
37 ; RUN: sort -b -k 1 | FileCheck %s --check-prefixes=LOOP32
3838 ;
3939 ; Single loop nest, not unswitched
4040 ; LOOP1: Loop at depth 1 containing:
2222 ; RUN: opt < %s -enable-nontrivial-unswitch -enable-unswitch-cost-multiplier=true \
2323 ; RUN: -unswitch-num-initial-unscaled-candidates=3 -unswitch-siblings-toplevel-div=1 \
2424 ; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | \
25 ; RUN: sort -b | FileCheck %s --check-prefixes=LOOP-UNSCALE3-DIV1
25 ; RUN: sort -b -k 1 | FileCheck %s --check-prefixes=LOOP-UNSCALE3-DIV1
2626 ;
2727 ; NB: sort -b is essential here and below, otherwise blanks might lead to different
2828 ; order depending on locale.
3030 ; RUN: opt < %s -enable-nontrivial-unswitch -enable-unswitch-cost-multiplier=true \
3131 ; RUN: -unswitch-num-initial-unscaled-candidates=3 -unswitch-siblings-toplevel-div=2 \
3232 ; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | \
33 ; RUN: sort -b | FileCheck %s --check-prefixes=LOOP-UNSCALE3-DIV2
33 ; RUN: sort -b -k 1 | FileCheck %s --check-prefixes=LOOP-UNSCALE3-DIV2
3434 ;
3535 ; With disabled cost-multiplier we get maximal possible amount of unswitches.
3636 ;
3737 ; RUN: opt < %s -enable-nontrivial-unswitch -enable-unswitch-cost-multiplier=false \
3838 ; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | \
39 ; RUN: sort -b | FileCheck %s --check-prefixes=LOOP-MAX
39 ; RUN: sort -b -k 1 | FileCheck %s --check-prefixes=LOOP-MAX
4040 ;
4141 ; Single loop nest, not unswitched
4242 ; LOOP1: Loop at depth 1 containing:
2323 ; RUN: opt < %s -enable-nontrivial-unswitch -enable-unswitch-cost-multiplier=true \
2424 ; RUN: -unswitch-num-initial-unscaled-candidates=8 -unswitch-siblings-toplevel-div=1 \
2525 ; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | \
26 ; RUN: sort -b | FileCheck %s --check-prefixes=LOOP-RELAX
26 ; RUN: sort -b -k 1 | FileCheck %s --check-prefixes=LOOP-RELAX
2727 ;
2828 ; With relaxed candidates multiplier (unscaled candidates == 8) and with relaxed
2929 ; siblings multiplier for top-level loops (toplevel-div == 8) we should get
3232 ; RUN: opt < %s -enable-nontrivial-unswitch -enable-unswitch-cost-multiplier=true \
3333 ; RUN: -unswitch-num-initial-unscaled-candidates=8 -unswitch-siblings-toplevel-div=8 \
3434 ; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | \
35 ; RUN: sort -b | FileCheck %s --check-prefixes=LOOP-RELAX2
35 ; RUN: sort -b -k 1 | FileCheck %s --check-prefixes=LOOP-RELAX2
3636 ;
3737 ; We get hundreds of copies of the loop when cost multiplier is disabled:
3838 ;
3939 ; RUN: opt < %s -enable-nontrivial-unswitch -enable-unswitch-cost-multiplier=false \
4040 ; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | \
41 ; RUN: sort -b | FileCheck %s --check-prefixes=LOOP-MAX
41 ; RUN: sort -b -k 1 | FileCheck %s --check-prefixes=LOOP-MAX
4242 ;
4343
4444 ; Single loop nest, not unswitched