diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2011-12-24 11:46:10 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2011-12-24 11:46:10 +0000 |
commit | 38ce24455df1800496d11f6d809c56a8f1feb307 (patch) | |
tree | f43c5f6dcec2f682a1619352652913583e56c978 /llvm/lib/Target/X86/X86ISelLowering.cpp | |
parent | 103ca80f59cb2c8edf62150185e507d70420e441 (diff) | |
download | bcm5719-llvm-38ce24455df1800496d11f6d809c56a8f1feb307.tar.gz bcm5719-llvm-38ce24455df1800496d11f6d809c56a8f1feb307.zip |
Add systematic testing for cttz as well, and fix the bug I spotted by
inspection earlier.
llvm-svn: 147250
Diffstat (limited to 'llvm/lib/Target/X86/X86ISelLowering.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 049e3cd842f..8aa62d25d7c 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/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); } |