The patterns of the immediate comparison instruction is rewrite here, and put similar code to a class.
Do not change any function of the original code, making the code more concise.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
There are two test cases CodeGen/RISCV/rvv/vmsltu-rv32.ll and CodeGen/RISCV/rvv/vmsltu-rv64.ll failed, should re-check the pattern of vmsltu.
llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td | ||
---|---|---|
3726 | "Specil"? Assuming that's a typo for "Special" that's hardly a descriptive name | |
4526 | This should be mapping to PseudoVMSLEU | |
4527 | Isn't it a bit dodgy for this to be done in the first place; shouldn't we be stopping the normal int_riscv_vmsltu pattern from matching that at all? Currently this relies in SelectionDAG picking the more specific pattern, but that should solely be as a heuristic for code quality, not correctness. |
- Fix spelling errors and some formatting.
- Modify vmsltu mapping to PseudoVMSLEU and fix failed cases
llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td | ||
---|---|---|
3726 | Special -> "UnsignedZero" maybe? |
llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td | ||
---|---|---|
4527 | I think we did this to match the assembler where we alias vmsltu.vi and vmsgeu.vi and with 0 immediate to vmsne and vmseq. For vmsleu.vi I suppose we could block the 0 immediate from matching in isel and let vmsleu.vx with X0 match. That wouldn't work for vmsgeu.vi though because there is no vmsgeu.vx instruction. We use a multiple instruction sequence. But since we know this is always true we wouldn't want to use a multiple instructions. Using vmset.m(for unmasked) and vmand.mm(for masked) would be better and avoid a false dependency I guess. But I think any change here should not be part of this patch. |
"Specil"? Assuming that's a typo for "Special" that's hardly a descriptive name