Bill contributed this major rewrite of the -lowerswitch pass to make it generate
[oota-llvm.git] / test / Feature / TestAsmDisasm.sh
1 #!/bin/sh
2 # test that every step outputs something that is consumable by 
3 # another step
4
5 rm -f test.bc.temp[12]
6
7 AS=$2/as
8 DIS=$2/dis
9
10 echo "======== Running assembler/disassembler test on $1"
11
12 # Two full cycles are needed for bitwise stability
13 (
14   $AS  < $1      > $1.bc.1 || exit 1
15   $DIS < $1.bc.1 > $1.ll.1 || exit 2
16   $AS  < $1.ll.1 > $1.bc.2 || exit 3
17   $DIS < $1.bc.2 > $1.ll.2 || exit 4
18
19   diff $1.ll.[12] || exit 7
20
21   # FIXME: When we sort things correctly and deterministically, we can
22   # reenable this
23   #diff $1.bc.[12] || exit 8
24
25   rm $1.[bl][cl].[12]
26   touch Output/$1.asmdis
27 ) || ../Failure.sh "$1 ASM/DIS"
28