@@ -2111,28 +2111,6 @@ template <typename Op_t> struct PtrToIntSameSize_match {
21112111 }
21122112};
21132113
2114- template <typename Op_t> struct PtrToIntOrAddr_GEAddrSize_match {
2115- const DataLayout &DL;
2116- Op_t Op;
2117-
2118- PtrToIntOrAddr_GEAddrSize_match (const DataLayout &DL, const Op_t &OpMatch)
2119- : DL(DL), Op(OpMatch) {}
2120-
2121- template <typename OpTy> bool match (OpTy *V) const {
2122- if (auto *O = dyn_cast<Operator>(V)) {
2123- unsigned Opcode = O->getOpcode ();
2124- // The ptrtoaddr result type always matches the address size.
2125- // For ptrtoint we have to explicitly check it.
2126- return (Opcode == Instruction::PtrToAddr ||
2127- (Opcode == Instruction::PtrToInt &&
2128- O->getType ()->getScalarSizeInBits () >=
2129- DL.getAddressSizeInBits (O->getOperand (0 )->getType ()))) &&
2130- Op.match (O->getOperand (0 ));
2131- }
2132- return false ;
2133- }
2134- };
2135-
21362114template <typename Op_t> struct NNegZExt_match {
21372115 Op_t Op;
21382116
@@ -2218,14 +2196,6 @@ template <typename OpTy> inline auto m_PtrToIntOrAddr(const OpTy &Op) {
22182196 return m_CombineOr (m_PtrToInt (Op), m_PtrToAddr (Op));
22192197}
22202198
2221- // / Matches PtrToInt or PtrToAddr where the result is greater than or equal
2222- // / to the pointer address size.
2223- template <typename OpTy>
2224- inline PtrToIntOrAddr_GEAddrSize_match<OpTy>
2225- m_PtrToIntOrAddr_GEAddrSize (const DataLayout &DL, const OpTy &Op) {
2226- return PtrToIntOrAddr_GEAddrSize_match<OpTy>(DL, Op);
2227- }
2228-
22292199// / Matches IntToPtr.
22302200template <typename OpTy>
22312201inline CastOperator_match<OpTy, Instruction::IntToPtr>
0 commit comments