Commit e0caee08 authored by Pirama Arumuga Nainar's avatar Pirama Arumuga Nainar Committed by Stephen Hines
Browse files

[UPSTREAM] [DAGCombiner] Do not fold truncate(build_vector(..)) if it creates an illegal type

Summary:
It can be the case that a vector type is legal but the corresponding
scalar type is not legal for an architecture (i8 vs. v16i8 on AArch64).
Check if the scalar type created when folding
  truncate(build_vector(x,y)) -> build_vector(truncate(x),truncate(y))

is legal if we are running after the type legalizer.

This fixes https://github.com/android/ndk/issues/1207.

Reviewers: RKSimon, srhines

Subscribers: kristof.beyls, hiraditya, danielkiss, llvm-commits

Tags: #llvm

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

Bug: https://github.com/android/ndk/issues/1207
(cherry picked from commit edcfb47f)
Change-Id: Ie7bbe6408f0608cc55a82bf6b0fee1c7b836282c
parent b777009c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment