Adds initial support for copyable elements. This patch only models adds and model copyable elements as add <element>, 0, i.e. uses identity constants for missing lanes. Only support for elements, which do not require scheduling, is added to reduce size of the patch. Fixed compile time regressions, reported crashes, updated release notes Reviewers: RKSimon, hiraditya Reviewed By: RKSimon Pull Request: https://github.com/llvm/llvm-project/pull/140279
40 lines
1.3 KiB
LLVM
40 lines
1.3 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
|
|
; RUN: opt -S --passes=slp-vectorizer -mtriple=x86_64-unknown-linux-gnu -slp-threshold=-99999 < %s | FileCheck %s
|
|
|
|
define i64 @test() {
|
|
; CHECK-LABEL: define i64 @test() {
|
|
; CHECK-NEXT: [[BB:.*]]:
|
|
; CHECK-NEXT: br label %[[BB1:.*]]
|
|
; CHECK: [[BB1]]:
|
|
; CHECK-NEXT: [[TMP1:%.*]] = phi <2 x i32> [ zeroinitializer, %[[BB]] ], [ [[TMP4:%.*]], %[[BB5:.*]] ]
|
|
; CHECK-NEXT: [[TMP2:%.*]] = or <2 x i32> zeroinitializer, [[TMP1]]
|
|
; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <2 x i32> [[TMP1]], <2 x i32> [[TMP2]], <2 x i32> <i32 0, i32 3>
|
|
; CHECK-NEXT: [[TMP4]] = or <2 x i32> [[TMP3]], zeroinitializer
|
|
; CHECK-NEXT: br label %[[BB5]]
|
|
; CHECK: [[BB5]]:
|
|
; CHECK-NEXT: br i1 false, label %[[BB6:.*]], label %[[BB1]]
|
|
; CHECK: [[BB6]]:
|
|
; CHECK-NEXT: [[TMP5:%.*]] = phi <2 x i32> [ [[TMP2]], %[[BB5]] ]
|
|
; CHECK-NEXT: ret i64 0
|
|
;
|
|
bb:
|
|
br label %bb1
|
|
|
|
bb1:
|
|
%phi = phi i32 [ 0, %bb ], [ %or, %bb5 ]
|
|
%phi2 = phi i32 [ 0, %bb ], [ %or4, %bb5 ]
|
|
%or = or i32 %phi, 0
|
|
%add = add i32 0, 0
|
|
%or3 = or i32 %add, %phi2
|
|
%or4 = or i32 %or3, 0
|
|
br label %bb5
|
|
|
|
bb5:
|
|
br i1 false, label %bb6, label %bb1
|
|
|
|
bb6:
|
|
%phi7 = phi i32 [ %or, %bb5 ]
|
|
%phi8 = phi i32 [ %or3, %bb5 ]
|
|
ret i64 0
|
|
}
|