Skip to content

Commit e91e4c6

Browse files
committed
Add a test for an intrinsic that is not marked as isTriviallyScalarizable
Since uadd_with_overflow is now marked isTriviallyScalarizable, another intrinsic needs to take its place for testing the bug fix introduced in llvm#113625 for issue llvm#113624.
1 parent 1ee9014 commit e91e4c6

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
2+
; RUN: opt %s -passes='function(scalarizer)' -S | FileCheck %s
3+
4+
; Test to make sure that struct return intrinsics that are not `isTriviallyScalarizable` do not get scalarized.
5+
6+
define <4 x float> @test_(<4 x float> %Val) {
7+
; CHECK-LABEL: define <4 x float> @test_(
8+
; CHECK-SAME: <4 x float> [[VAL:%.*]]) {
9+
; CHECK-NEXT: [[R:%.*]] = call { <4 x float>, <4 x float> } @llvm.sincos.v4f32(<4 x float> [[VAL]])
10+
; CHECK-NEXT: [[EL:%.*]] = extractvalue { <4 x float>, <4 x float> } [[R]], 0
11+
; CHECK-NEXT: ret <4 x float> [[EL]]
12+
;
13+
%r = call { <4 x float>, <4 x float> } @llvm.sincos.v4f32(<4 x float> %Val)
14+
%el = extractvalue { <4 x float>, <4 x float> } %r, 0
15+
ret <4 x float> %el
16+
}
17+

0 commit comments

Comments
 (0)