aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-12-24 11:46:10 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-12-24 11:46:10 +0000
commit3d636ea8edf9332ab5ab2d92f7ea5c7444e88757 (patch)
tree6fd0dafe4fde866ef087efe76afb65946d7685e5 /lib/Target
parent9d2051f7fa1b10c4c768e02948365fbc5d80422a (diff)
downloadexternal_llvm-3d636ea8edf9332ab5ab2d92f7ea5c7444e88757.tar.gz
external_llvm-3d636ea8edf9332ab5ab2d92f7ea5c7444e88757.tar.bz2
external_llvm-3d636ea8edf9332ab5ab2d92f7ea5c7444e88757.zip
Add systematic testing for cttz as well, and fix the bug I spotted by
inspection earlier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147250 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r--lib/Target/X86/X86ISelLowering.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp
index 049e3cd842..8aa62d25d7 100644
--- a/lib/Target/X86/X86ISelLowering.cpp
+++ b/lib/Target/X86/X86ISelLowering.cpp
@@ -379,9 +379,9 @@ X86TargetLowering::X86TargetLowering(X86TargetMachine &TM)
setOperationAction(ISD::FREM , MVT::f80 , Expand);
setOperationAction(ISD::FLT_ROUNDS_ , MVT::i32 , Custom);
- setOperationAction(ISD::CTTZ_ZERO_UNDEF , MVT::i8 , Expand);
if (Subtarget->hasBMI()) {
setOperationAction(ISD::CTTZ , MVT::i8 , Promote);
+ setOperationAction(ISD::CTTZ_ZERO_UNDEF, MVT::i8 , Expand);
setOperationAction(ISD::CTTZ_ZERO_UNDEF, MVT::i16 , Expand);
setOperationAction(ISD::CTTZ_ZERO_UNDEF, MVT::i32 , Expand);
if (Subtarget->is64Bit())
@@ -390,6 +390,7 @@ X86TargetLowering::X86TargetLowering(X86TargetMachine &TM)
setOperationAction(ISD::CTTZ , MVT::i8 , Custom);
setOperationAction(ISD::CTTZ , MVT::i16 , Custom);
setOperationAction(ISD::CTTZ , MVT::i32 , Custom);
+ setOperationAction(ISD::CTTZ_ZERO_UNDEF, MVT::i8 , Promote);
if (Subtarget->is64Bit())
setOperationAction(ISD::CTTZ , MVT::i64 , Custom);
}