This is designed to change the bitwidth of a type without altering the number of vector lanes. Also useful in D68651. Otherwise an NFC.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Nice, i like this!
This doesn't change the bitwidth of the type it is called on though, it returns new type,
so i think the name needs a bit more thought (i can't give a better suggestion right now)
llvm/include/llvm/IR/Type.h | ||
---|---|---|
386 | s/the bitwidth/the lane bitwidth/ |
llvm/include/llvm/IR/Type.h | ||
---|---|---|
388 | NewBitWidth |
Comment Actions
Hows about a static getWithNewBitWidth(Type*, NewBitWidth)? Similar to Types existing static get methods.
So used like: Type *CondTy = Type::getWithNewBitWidth(RetTy, 1)
Comment Actions
AH yes, i think that would be good.
I don't really see why it should be static, getExtendedType() isn't.
s/the bitwidth/the lane bitwidth/