[all-commits] [llvm/llvm-project] baab79: [ValueTypes] Assert if changeVectorElementType is ...

Craig Topper via All-commits all-commits at lists.llvm.org
Fri Feb 19 17:35:51 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: baab7978787d64df25ab073bb7e0ec92b5608797
      https://github.com/llvm/llvm-project/commit/baab7978787d64df25ab073bb7e0ec92b5608797
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2021-02-19 (Fri, 19 Feb 2021)

  Changed paths:
    M llvm/include/llvm/CodeGen/ValueTypes.h
    M llvm/lib/CodeGen/ValueTypes.cpp

  Log Message:
  -----------
  [ValueTypes] Assert if changeVectorElementType is called on a simple type with an extended element type.

Previously we would use the extended implementation, but
the extended implementation requires the vector type to be extended
so that we can access the LLVMContext. In theory we could
detect this case and use the context from the element type instead,
but since I know of no cases hitting this in practice today
I've done the simplest thing.

Also add asserts to several extended EVT functions that assume
LLVMTy is non-null.

Follow from discussion in D97036

Reviewed By: pengfei

Differential Revision: https://reviews.llvm.org/D97070




More information about the All-commits mailing list