Fix PR10475
authorMichael Liao <michael.liao@intel.com>
Fri, 1 Mar 2013 18:40:30 +0000 (18:40 +0000)
committerMichael Liao <michael.liao@intel.com>
Fri, 1 Mar 2013 18:40:30 +0000 (18:40 +0000)
commit6af16fc3b7d0355ca43b838ef79faaa63c44b6b5
tree4ba86621fb61c4e2323158ec1261600f9cd91344
parent9660343b423ecce2cac5b125f87d145bb3cd12b4
Fix PR10475

- ISD::SHL/SRL/SRA must have either both scalar or both vector operands
  but TLI.getShiftAmountTy() so far only return scalar type. As a
  result, backend logic assuming that breaks.
- Rename the original TLI.getShiftAmountTy() to
  TLI.getScalarShiftAmountTy() and re-define TLI.getShiftAmountTy() to
  return target-specificed scalar type or the same vector type as the
  1st operand.
- Fix most TICG logic assuming TLI.getShiftAmountTy() a simple scalar
  type.

llvm-svn: 176364
14 files changed:
llvm/include/llvm/CodeGen/ISDOpcodes.h
llvm/include/llvm/Target/TargetLowering.h
llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/lib/CodeGen/TargetLoweringBase.cpp
llvm/lib/Target/MSP430/MSP430ISelLowering.h
llvm/lib/Target/Mips/MipsISelLowering.h
llvm/lib/Target/NVPTX/NVPTXISelLowering.h
llvm/lib/Target/PowerPC/PPCISelLowering.h
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/lib/Target/X86/X86ISelLowering.h
llvm/lib/Target/XCore/XCoreISelLowering.h
llvm/test/CodeGen/X86/pr10475.ll [new file with mode: 0644]