diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2010-07-26 21:01:18 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2010-07-26 21:01:18 +0000 |
commit | 3c45734274851c050a52f5068bf25d20a8da60d6 (patch) | |
tree | ba867f0448510607dd4cc7bdb8c68429cba8cc3c /lib/Target/X86 | |
parent | c2b13f919dc20cbee1bab36400fe10593ec5ac2d (diff) | |
download | external_llvm-3c45734274851c050a52f5068bf25d20a8da60d6.zip external_llvm-3c45734274851c050a52f5068bf25d20a8da60d6.tar.gz external_llvm-3c45734274851c050a52f5068bf25d20a8da60d6.tar.bz2 |
Temporary hack to let codegen assert or generate poor code in case
we are using AVX and no AVX version of the desired intruction is present,
this is better for incremental dev (without fallbacks it's easier to spot
what's missing). Not sure this is the best hack thought (we can also disable
all HasSSE* predicates by dinamically marking them 'false' if AVX is present)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109434 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86')
-rw-r--r-- | lib/Target/X86/X86InstrInfo.td | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/lib/Target/X86/X86InstrInfo.td b/lib/Target/X86/X86InstrInfo.td index 8d370fe..2cfa2ca 100644 --- a/lib/Target/X86/X86InstrInfo.td +++ b/lib/Target/X86/X86InstrInfo.td @@ -348,14 +348,19 @@ def tls32addr : ComplexPattern<i32, 5, "SelectTLSADDRAddr", // X86 Instruction Predicate Definitions. def HasCMov : Predicate<"Subtarget->hasCMov()">; def NoCMov : Predicate<"!Subtarget->hasCMov()">; -def HasMMX : Predicate<"Subtarget->hasMMX()">; -def HasSSE1 : Predicate<"Subtarget->hasSSE1()">; -def HasSSE2 : Predicate<"Subtarget->hasSSE2()">; -def HasSSE3 : Predicate<"Subtarget->hasSSE3()">; -def HasSSSE3 : Predicate<"Subtarget->hasSSSE3()">; -def HasSSE41 : Predicate<"Subtarget->hasSSE41()">; -def HasSSE42 : Predicate<"Subtarget->hasSSE42()">; -def HasSSE4A : Predicate<"Subtarget->hasSSE4A()">; + +// FIXME: temporary hack to let codegen assert or generate poor code in case +// no AVX version of the desired intructions is present, this is better for +// incremental dev (without fallbacks it's easier to spot what's missing) +def HasMMX : Predicate<"Subtarget->hasMMX() & !Subtarget->hasAVX()">; +def HasSSE1 : Predicate<"Subtarget->hasSSE1() & !Subtarget->hasAVX()">; +def HasSSE2 : Predicate<"Subtarget->hasSSE2() & !Subtarget->hasAVX()">; +def HasSSE3 : Predicate<"Subtarget->hasSSE3() & !Subtarget->hasAVX()">; +def HasSSSE3 : Predicate<"Subtarget->hasSSSE3() & !Subtarget->hasAVX()">; +def HasSSE41 : Predicate<"Subtarget->hasSSE41() & !Subtarget->hasAVX()">; +def HasSSE42 : Predicate<"Subtarget->hasSSE42() & !Subtarget->hasAVX()">; +def HasSSE4A : Predicate<"Subtarget->hasSSE4A() & !Subtarget->hasAVX()">; + def HasAVX : Predicate<"Subtarget->hasAVX()">; def HasCLMUL : Predicate<"Subtarget->hasCLMUL()">; def HasFMA3 : Predicate<"Subtarget->hasFMA3()">; |