Alexey Bataev d65ff3e936 [SLP]Fix PR107198: add a check for empty complex type
Need to check if the complex type is empty before trying to dig in,
trying to find vectorizable type

Fixes https://github.com/llvm/llvm-project/issues/107198
2024-09-04 05:13:43 -07:00

15 lines
1.2 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
; RUN: opt -S --passes=slp-vectorizer < %s | FileCheck %s
define { { {}, {}, {}, {}, {}, {}, {} } } @test({ {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, { {}, {}, {}, {}, {}, {}, {} }, { {} } } %0) {
; CHECK-LABEL: define { { {}, {}, {}, {}, {}, {}, {} } } @test(
; CHECK-SAME: { {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, { {}, {}, {}, {}, {}, {}, {} }, { {} } } [[TMP0:%.*]]) {
; CHECK-NEXT: [[TMP2:%.*]] = extractvalue { {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, { {}, {}, {}, {}, {}, {}, {} }, { {} } } [[TMP0]], 18
; CHECK-NEXT: [[TMP3:%.*]] = insertvalue { { {}, {}, {}, {}, {}, {}, {} } } undef, { {}, {}, {}, {}, {}, {}, {} } [[TMP2]], 0
; CHECK-NEXT: ret { { {}, {}, {}, {}, {}, {}, {} } } [[TMP3]]
;
%2 = extractvalue { {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, { {}, {}, {}, {}, {}, {}, {} }, { {} } } %0, 18
%3 = insertvalue { { {}, {}, {}, {}, {}, {}, {} } } undef, { {}, {}, {}, {}, {}, {}, {} } %2, 0
ret { { {}, {}, {}, {}, {}, {}, {} } } %3
}