rogfer01 added a comment.

I can reproduce the crash above in my computer, so something is definitely off.

Looks like we emit this

  case RISCV::BI__builtin_rvv_vmmv_m_b8:                
  case RISCV::BI__builtin_rvv_vmmv_m_b4:                
  case RISCV::BI__builtin_rvv_vmmv_m_b2:                
  case RISCV::BI__builtin_rvv_vmmv_m_b1:                
  case RISCV::BI__builtin_rvv_vmmv_m_b16:               
  case RISCV::BI__builtin_rvv_vmmv_m_b32:               
  case RISCV::BI__builtin_rvv_vmmv_m_b64:               
  case RISCV::BI__builtin_rvv_vmand_mm_b8:              
  case RISCV::BI__builtin_rvv_vmand_mm_b4:              
  case RISCV::BI__builtin_rvv_vmand_mm_b2:              
  case RISCV::BI__builtin_rvv_vmand_mm_b1:              
  case RISCV::BI__builtin_rvv_vmand_mm_b16:             
  case RISCV::BI__builtin_rvv_vmand_mm_b32:             
  case RISCV::BI__builtin_rvv_vmand_mm_b64:             
    ID = Intrinsic::riscv_vmand;                        
    IntrinsicTypes = {ResultType, Ops[2]->getType()};   
    break;                                              

But `Ops` has size 2 so this is accessing past the end. I observed the crash 
with `clang::RISCV::BI__builtin_rvv_vmmv_m_b1` but I assume it happens with the 
other ones as well.

I think the description of the builtin should be `def : RVVBuiltin<"m", "m", 
type_range>;` as these are like unary operations, aren't they?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100821/new/

https://reviews.llvm.org/D100821

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to