From: Duncan Sands Date: Mon, 27 Oct 2008 08:42:46 +0000 (+0000) Subject: Turn on LegalizeTypes, the new type legalization X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7cb07874dcadaa9a5082a80959cd15d44ba3a133;p=oota-llvm.git Turn on LegalizeTypes, the new type legalization codegen infrastructure, by default. Please report any breakage to the mailing lists. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58232 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 98ebebe50ec..4e05814b1a1 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -54,7 +54,7 @@ using namespace llvm; static cl::opt EnableValueProp("enable-value-prop", cl::Hidden); static cl::opt -EnableLegalizeTypes("enable-legalize-types", cl::Hidden); +DisableLegalizeTypes("disable-legalize-types", cl::Hidden); static cl::opt EnableFastISelVerbose("fast-isel-verbose", cl::Hidden, cl::desc("Enable verbose messages in the \"fast\" " @@ -572,7 +572,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() { // Second step, hack on the DAG until it only uses operations and types that // the target supports. - if (EnableLegalizeTypes) {// Enable this some day. + if (!DisableLegalizeTypes) { if (ViewLegalizeTypesDAGs) CurDAG->viewGraph("legalize-types input for " + BlockName); diff --git a/test/CodeGen/Generic/2007-11-21-UndeadIllegalNode.ll b/test/CodeGen/Generic/2007-11-21-UndeadIllegalNode.ll index b0a27640be7..cedee6ffbe0 100644 --- a/test/CodeGen/Generic/2007-11-21-UndeadIllegalNode.ll +++ b/test/CodeGen/Generic/2007-11-21-UndeadIllegalNode.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -enable-legalize-types -o - +; RUN: llvm-as < %s | llc -o - target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32" target triple = "i686-pc-linux-gnu" diff --git a/test/CodeGen/Generic/APIntLoadStore.ll b/test/CodeGen/Generic/APIntLoadStore.ll index bb3b1942402..bee7c632980 100644 --- a/test/CodeGen/Generic/APIntLoadStore.ll +++ b/test/CodeGen/Generic/APIntLoadStore.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -enable-legalize-types +; RUN: llvm-as < %s | llc @i1_l = external global i1 ; [#uses=1] @i1_s = external global i1 ; [#uses=1] @i2_l = external global i2 ; [#uses=1] diff --git a/test/CodeGen/Generic/APIntParam.ll b/test/CodeGen/Generic/APIntParam.ll index 8ce45d5ccd5..c1a3a449bcc 100644 --- a/test/CodeGen/Generic/APIntParam.ll +++ b/test/CodeGen/Generic/APIntParam.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -enable-legalize-types +; RUN: llvm-as < %s | llc @i1_s = external global i1 ; [#uses=1] @i2_s = external global i2 ; [#uses=1] @i3_s = external global i3 ; [#uses=1] diff --git a/test/CodeGen/Generic/APIntSextParam.ll b/test/CodeGen/Generic/APIntSextParam.ll index fa657bbc95b..c5927fcf732 100644 --- a/test/CodeGen/Generic/APIntSextParam.ll +++ b/test/CodeGen/Generic/APIntSextParam.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -enable-legalize-types +; RUN: llvm-as < %s | llc @i1_s = external global i1 ; [#uses=1] @i2_s = external global i2 ; [#uses=1] @i3_s = external global i3 ; [#uses=1] diff --git a/test/CodeGen/Generic/APIntZextParam.ll b/test/CodeGen/Generic/APIntZextParam.ll index 926e8287121..71d327063b0 100644 --- a/test/CodeGen/Generic/APIntZextParam.ll +++ b/test/CodeGen/Generic/APIntZextParam.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -enable-legalize-types +; RUN: llvm-as < %s | llc @i1_s = external global i1 ; [#uses=1] @i2_s = external global i2 ; [#uses=1] @i3_s = external global i3 ; [#uses=1] diff --git a/test/CodeGen/Mips/2008-06-05-Carry.ll b/test/CodeGen/Mips/2008-06-05-Carry.ll index c2c5e5eea07..9cd7c80577a 100644 --- a/test/CodeGen/Mips/2008-06-05-Carry.ll +++ b/test/CodeGen/Mips/2008-06-05-Carry.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t +; RUN: llvm-as < %s | llc -march=mips -f -o %t ; RUN: grep subu %t | count 2 ; RUN: grep addu %t | count 4 diff --git a/test/CodeGen/Mips/2008-07-03-SRet.ll b/test/CodeGen/Mips/2008-07-03-SRet.ll index b2813f2e673..53ceaf36065 100644 --- a/test/CodeGen/Mips/2008-07-03-SRet.ll +++ b/test/CodeGen/Mips/2008-07-03-SRet.ll @@ -1,5 +1,4 @@ -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips | \ -; RUN: grep {sw.*(\$4)} | count 3 +; RUN: llvm-as < %s | llc -march=mips | grep {sw.*(\$4)} | count 3 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" target triple = "mipsallegrexel-psp-elf" diff --git a/test/CodeGen/Mips/2008-07-05-ByVal.ll b/test/CodeGen/Mips/2008-07-05-ByVal.ll index 6e14b784da8..2d1101a2530 100644 --- a/test/CodeGen/Mips/2008-07-05-ByVal.ll +++ b/test/CodeGen/Mips/2008-07-05-ByVal.ll @@ -1,5 +1,4 @@ -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips | \ -; RUN: grep {lw.*(\$4)} | count 2 +; RUN: llvm-as < %s | llc -march=mips | grep {lw.*(\$4)} | count 2 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" target triple = "mipsallegrexel-psp-elf" diff --git a/test/CodeGen/Mips/2008-07-06-fadd64.ll b/test/CodeGen/Mips/2008-07-06-fadd64.ll index d85e1e01b4a..95792ff1571 100644 --- a/test/CodeGen/Mips/2008-07-06-fadd64.ll +++ b/test/CodeGen/Mips/2008-07-06-fadd64.ll @@ -1,5 +1,4 @@ -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips | \ -; RUN: grep __adddf3 +; RUN: llvm-as < %s | llc -march=mips | grep __adddf3 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" target triple = "mipsallegrexel-psp-elf" diff --git a/test/CodeGen/Mips/2008-07-07-FPExtend.ll b/test/CodeGen/Mips/2008-07-07-FPExtend.ll index 265da730b27..e0e7d767b1d 100644 --- a/test/CodeGen/Mips/2008-07-07-FPExtend.ll +++ b/test/CodeGen/Mips/2008-07-07-FPExtend.ll @@ -1,5 +1,4 @@ -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips | \ -; RUN: grep __extendsfdf2 +; RUN: llvm-as < %s | llc -march=mips | grep __extendsfdf2 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" target triple = "mipsallegrexel-psp-elf" diff --git a/test/CodeGen/Mips/2008-07-07-Float2Int.ll b/test/CodeGen/Mips/2008-07-07-Float2Int.ll index ccaac0edd56..f2f0374c316 100644 --- a/test/CodeGen/Mips/2008-07-07-Float2Int.ll +++ b/test/CodeGen/Mips/2008-07-07-Float2Int.ll @@ -1,5 +1,4 @@ -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips | \ -; RUN: grep trunc.w.s | count 3 +; RUN: llvm-as < %s | llc -march=mips | grep trunc.w.s | count 3 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" target triple = "mipsallegrexel-psp-elf" diff --git a/test/CodeGen/Mips/2008-07-07-IntDoubleConvertions.ll b/test/CodeGen/Mips/2008-07-07-IntDoubleConvertions.ll index bf2b4d082a5..ab6a9c8edae 100644 --- a/test/CodeGen/Mips/2008-07-07-IntDoubleConvertions.ll +++ b/test/CodeGen/Mips/2008-07-07-IntDoubleConvertions.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t +; RUN: llvm-as < %s | llc -march=mips -f -o %t ; RUN: grep __floatsidf %t | count 1 ; RUN: grep __floatunsidf %t | count 1 ; RUN: grep __fixdfsi %t | count 1 diff --git a/test/CodeGen/Mips/2008-07-15-InternalConstant.ll b/test/CodeGen/Mips/2008-07-15-InternalConstant.ll index ea0f5fef062..4d218cf6b4b 100644 --- a/test/CodeGen/Mips/2008-07-15-InternalConstant.ll +++ b/test/CodeGen/Mips/2008-07-15-InternalConstant.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t +; RUN: llvm-as < %s | llc -march=mips -f -o %t ; RUN: grep {rodata.str1.4,"aMS",@progbits} %t | count 1 ; RUN: grep {r.data,} %t | count 1 ; RUN: grep {\%hi} %t | count 2 diff --git a/test/CodeGen/Mips/2008-07-16-SignExtInReg.ll b/test/CodeGen/Mips/2008-07-16-SignExtInReg.ll index 872f65d847f..fc03bb5fef0 100644 --- a/test/CodeGen/Mips/2008-07-16-SignExtInReg.ll +++ b/test/CodeGen/Mips/2008-07-16-SignExtInReg.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t +; RUN: llvm-as < %s | llc -march=mips -f -o %t ; RUN: grep seh %t | count 1 ; RUN: grep seb %t | count 1 diff --git a/test/CodeGen/Mips/2008-07-22-Cstpool.ll b/test/CodeGen/Mips/2008-07-22-Cstpool.ll index 770cc69c04f..99eccf500db 100644 --- a/test/CodeGen/Mips/2008-07-22-Cstpool.ll +++ b/test/CodeGen/Mips/2008-07-22-Cstpool.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t +; RUN: llvm-as < %s | llc -march=mips -f -o %t ; RUN: grep {CPI\[01\]_\[01\]:} %t | count 2 ; RUN: grep {rodata.cst4,"aM",@progbits} %t | count 1 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" diff --git a/test/CodeGen/Mips/2008-07-23-fpcmp.ll b/test/CodeGen/Mips/2008-07-23-fpcmp.ll index 3fcec1629d8..7bc1f42d10a 100644 --- a/test/CodeGen/Mips/2008-07-23-fpcmp.ll +++ b/test/CodeGen/Mips/2008-07-23-fpcmp.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t +; RUN: llvm-as < %s | llc -march=mips -f -o %t ; RUN: grep {c\\..*\\.s} %t | count 3 ; RUN: grep {bc1\[tf\]} %t | count 3 diff --git a/test/CodeGen/Mips/2008-07-29-icmp.ll b/test/CodeGen/Mips/2008-07-29-icmp.ll index ee2b71fa235..5d03a1986b2 100644 --- a/test/CodeGen/Mips/2008-07-29-icmp.ll +++ b/test/CodeGen/Mips/2008-07-29-icmp.ll @@ -1,5 +1,4 @@ -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips | \ -; RUN: grep {b\[ne\]\[eq\]} | count 1 +; RUN: llvm-as < %s | llc -march=mips | grep {b\[ne\]\[eq\]} | count 1 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" target triple = "mipsallegrexel-psp-elf" diff --git a/test/CodeGen/Mips/2008-07-31-fcopysign.ll b/test/CodeGen/Mips/2008-07-31-fcopysign.ll index a1f4443d645..de11ac77c01 100644 --- a/test/CodeGen/Mips/2008-07-31-fcopysign.ll +++ b/test/CodeGen/Mips/2008-07-31-fcopysign.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t +; RUN: llvm-as < %s | llc -march=mips -f -o %t ; RUN: grep abs.s %t | count 1 ; RUN: grep neg.s %t | count 1 diff --git a/test/CodeGen/Mips/2008-08-01-AsmInline.ll b/test/CodeGen/Mips/2008-08-01-AsmInline.ll index 1bd645af738..fea5730f73d 100644 --- a/test/CodeGen/Mips/2008-08-01-AsmInline.ll +++ b/test/CodeGen/Mips/2008-08-01-AsmInline.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t +; RUN: llvm-as < %s | llc -march=mips -f -o %t ; RUN: grep mfhi %t | count 1 ; RUN: grep mflo %t | count 1 ; RUN: grep multu %t | count 1 diff --git a/test/CodeGen/Mips/2008-08-03-fabs64.ll b/test/CodeGen/Mips/2008-08-03-fabs64.ll index 4ce1b1c7070..8495bfe1129 100644 --- a/test/CodeGen/Mips/2008-08-03-fabs64.ll +++ b/test/CodeGen/Mips/2008-08-03-fabs64.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t +; RUN: llvm-as < %s | llc -march=mips -f -o %t ; RUN: grep {lui.*32767} %t | count 1 ; RUN: grep {ori.*65535} %t | count 1 diff --git a/test/CodeGen/Mips/2008-08-04-Bitconvert.ll b/test/CodeGen/Mips/2008-08-04-Bitconvert.ll index fca3c00c69d..f7a64c32f27 100644 --- a/test/CodeGen/Mips/2008-08-04-Bitconvert.ll +++ b/test/CodeGen/Mips/2008-08-04-Bitconvert.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t +; RUN: llvm-as < %s | llc -march=mips -f -o %t ; RUN: grep mtc1 %t | count 1 ; RUN: grep mfc1 %t | count 1 diff --git a/test/CodeGen/Mips/2008-08-06-Alloca.ll b/test/CodeGen/Mips/2008-08-06-Alloca.ll index aaac67ea62c..34596ea029a 100644 --- a/test/CodeGen/Mips/2008-08-06-Alloca.ll +++ b/test/CodeGen/Mips/2008-08-06-Alloca.ll @@ -1,5 +1,4 @@ -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips | \ -; RUN: grep {subu.*sp} | count 2 +; RUN: llvm-as < %s | llc -march=mips | grep {subu.*sp} | count 2 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" target triple = "mipsallegrexel-psp-elf" diff --git a/test/CodeGen/Mips/2008-08-07-FPRound.ll b/test/CodeGen/Mips/2008-08-07-FPRound.ll index 1382f876751..fd41ff1f8cf 100644 --- a/test/CodeGen/Mips/2008-08-07-FPRound.ll +++ b/test/CodeGen/Mips/2008-08-07-FPRound.ll @@ -1,5 +1,4 @@ -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips | \ -; RUN: grep __truncdfsf2 | count 1 +; RUN: llvm-as < %s | llc -march=mips | grep __truncdfsf2 | count 1 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" target triple = "mipsallegrexel-psp-elf" diff --git a/test/CodeGen/X86/2008-10-16-VecUnaryOp.ll b/test/CodeGen/X86/2008-10-16-VecUnaryOp.ll index 5a7d9a9d22c..e1dc7b6bb27 100644 --- a/test/CodeGen/X86/2008-10-16-VecUnaryOp.ll +++ b/test/CodeGen/X86/2008-10-16-VecUnaryOp.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -enable-legalize-types +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 ; PR2762 define void @foo(<4 x i32>* %p, <4 x double>* %q) { %n = load <4 x i32>* %p diff --git a/test/CodeGen/X86/2008-10-24-FlippedCompare.ll b/test/CodeGen/X86/2008-10-24-FlippedCompare.ll index 8a7987db599..d6ae05e3798 100644 --- a/test/CodeGen/X86/2008-10-24-FlippedCompare.ll +++ b/test/CodeGen/X86/2008-10-24-FlippedCompare.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -enable-legalize-types -march=x86 -mattr=+sse2 -o - | not grep {ucomiss\[^,\]*esp} +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -o - | not grep {ucomiss\[^,\]*esp} define void @f(float %wt) { entry: