[llvm] [RISCV] Check for COPY_TO_REGCLASS in usesAllOnesMask (PR #67037)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 21 10:47:36 PDT 2023
================
@@ -3188,6 +3188,12 @@ static bool usesAllOnesMask(SDValue MaskOp, SDValue GlueOp) {
// Check the instruction defining V0; it needs to be a VMSET pseudo.
SDValue MaskSetter = Glued->getOperand(2);
+ // Sometimes the VMSET is wrapped in a COPY_TO_REGCLASS node, e.g. if the mask
+ // was extracted from a larger register.
----------------
preames wrote:
There's something off here. The docs and lowering code for COPY_TO_REGCLASS say that it is "like a copy", but fixes the destination register class. Your comment seems to say that it's more like a EXTRACT_SUBREG. I can't reconcile these two. Are you really sure the two register classes here are different sizes? Can you give an example of the before and after register class?
https://github.com/llvm/llvm-project/pull/67037
More information about the llvm-commits
mailing list