aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/Transforms/Scalarizer/deinterleave2.ll
blob: bbc7c726857dfe172717c486e92028abb7aaadee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
; RUN: opt %s -passes="function(scalarizer)" -S | FileCheck %s

; Test to make sure that struct return intrinsics that are not `isTriviallyScalarizable` do not get scalarized.

define <2 x float> @test_(<4 x float> %Val) {
; CHECK-LABEL: define <2 x float> @test_(
; CHECK-SAME: <4 x float> [[VAL:%.*]]) {
; CHECK-NEXT:    [[R:%.*]] = call { <2 x float>, <2 x float> } @llvm.vector.deinterleave2.v4f32(<4 x float> [[VAL]])
; CHECK-NEXT:    [[EL:%.*]] = extractvalue { <2 x float>, <2 x float> } [[R]], 0
; CHECK-NEXT:    ret <2 x float> [[EL]]
;
  %r = call { <2 x float>, <2 x float> } @llvm.vector.deinterleave2.v4f32(<4 x float> %Val)
  %el = extractvalue { <2 x float>, <2 x float> } %r, 0
  ret <2 x float> %el
}