If doubling the VL will fit in a vsetvli, use it. It will be cheap
to change and cheap to change back.
This improves codegen from D158896.
| Paths 
 |  Differential  D158896  
[RISCV] Improve splatPartsI64WithVL for fixed vector constants where Hi Lo are same and the VL is constant. ClosedPublic Authored by craig.topper on Aug 25 2023, 2:30 PM. 
Details Summary If doubling the VL will fit in a vsetvli, use it. It will be cheap This improves codegen from D158896. 
Diff Detail 
 Event TimelineComment Actions LGTM A few ideas for possible followups: 
 This revision is now accepted and ready to land.Aug 25 2023, 2:48 PM This revision was landed with ongoing or failed builds.Aug 29 2023, 9:28 AM Closed by commit rG7b5cf52f32c0: [RISCV] Improve splatPartsI64WithVL for fixed vector constants where Hi and Lo… (authored by craig.topper).  ·  Explain Why This revision was automatically updated to reflect the committed changes. 
Revision Contents 
 
 
 
Diff 554393 llvm/lib/Target/RISCV/RISCVISelLowering.cpp
 
 llvm/test/CodeGen/RISCV/rvv/fixed-vectors-bitreverse-vp.ll
 llvm/test/CodeGen/RISCV/rvv/fixed-vectors-bitreverse.ll
 llvm/test/CodeGen/RISCV/rvv/fixed-vectors-ctlz-vp.ll
 llvm/test/CodeGen/RISCV/rvv/fixed-vectors-ctlz.ll
 llvm/test/CodeGen/RISCV/rvv/fixed-vectors-ctpop-vp.ll
 llvm/test/CodeGen/RISCV/rvv/fixed-vectors-ctpop.ll
 llvm/test/CodeGen/RISCV/rvv/fixed-vectors-cttz-vp.ll
 llvm/test/CodeGen/RISCV/rvv/fixed-vectors-cttz.ll
 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||