19 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt -S -passes=verify < %s 2>&1 | FileCheck %s3 4; Make sure we allow scalable vectors in structs for returning multiple5; values from intrinsics.6 7declare { <vscale x 2 x i32>, <vscale x 2 x i1> } @llvm.sadd.with.overflow.nxv2i32(<vscale x 2 x i32>, <vscale x 2 x i32>)8 9define <vscale x 2 x i32> @foo(<vscale x 2 x i32> %x, <vscale x 2 x i32> %y) {10; CHECK-LABEL: @foo(11; CHECK-NEXT: [[A:%.*]] = call { <vscale x 2 x i32>, <vscale x 2 x i1> } @llvm.sadd.with.overflow.nxv2i32(<vscale x 2 x i32> [[X:%.*]], <vscale x 2 x i32> [[Y:%.*]])12; CHECK-NEXT: [[B:%.*]] = extractvalue { <vscale x 2 x i32>, <vscale x 2 x i1> } [[A]], 013; CHECK-NEXT: ret <vscale x 2 x i32> [[B]]14;15 %a = call { <vscale x 2 x i32>, <vscale x 2 x i1> } @llvm.sadd.with.overflow.nxv2i32(<vscale x 2 x i32> %x, <vscale x 2 x i32> %y)16 %b = extractvalue { <vscale x 2 x i32>, <vscale x 2 x i1> } %a, 017 ret <vscale x 2 x i32> %b18}19