[llvm] Nvptx port LowerBITCAST to SelectionDAG (PR #120903)

via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 22 07:34:21 PST 2024


GrumpyPigSkin wrote:

@justinfargnoli Could you please review this, I have a couple of questions/notes also:

1. I have put `MaybeBitcast` in `LegalizeTypes.cpp` but there is also an exact copy in `NVPTXISelLowering.cpp` is there some common place this could go to remove the duplication?

2. I wasn't 100% sure which class the `LowerBitcast` method should be defined in so if there is a more suitable place lmk.

3. I added the operation inside of `PromoteIntOp_BITCAST` but again, I wasn't 100% sure if this was the best place to apply the transform. If `CustomLowerNode` fails to lower, it does the generic transform inside of `PromoteIntOp_BITCAST`, so I thought that could be a good place to do it.

Thanks :)


https://github.com/llvm/llvm-project/pull/120903


More information about the llvm-commits mailing list