[NFC][IR] Type: add getWithNewType() method
authorRoman Lebedev <lebedev.ri@gmail.com>
Mon, 22 Mar 2021 16:51:57 +0000 (19:51 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Mon, 22 Mar 2021 21:50:58 +0000 (00:50 +0300)
commitd37fe26a2bbf2f59e3fe3385ef7127086c9d7ee1
tree0adca2e64ec459f80ee2ed792b84a158573d417c
parent95f7f7c21b47f1739e4a901d428af970b7d7c0b9
[NFC][IR] Type: add getWithNewType() method

Sometimes you want to get a type with same vector element count
as the current type, but different element type,
but there's no QOL wrapper to do that. Add one.
llvm/include/llvm/IR/DerivedTypes.h
llvm/include/llvm/IR/Type.h
llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp