1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -instcombine < %s | FileCheck %s
4 target triple = "aarch64-unknown-linux-gnu"
6 ; Test that rdffr is substituted with predicated form which enables ptest optimization later.
7 define <vscale x 16 x i1> @predicate_rdffr() #0 {
8 ; CHECK-LABEL: @predicate_rdffr(
9 ; CHECK-NEXT: [[TMP1:%.*]] = call <vscale x 16 x i1> @llvm.aarch64.sve.ptrue.nxv16i1(i32 31)
10 ; CHECK-NEXT: [[OUT:%.*]] = call <vscale x 16 x i1> @llvm.aarch64.sve.rdffr.z(<vscale x 16 x i1> [[TMP1]])
11 ; CHECK-NEXT: ret <vscale x 16 x i1> [[OUT]]
13 %out = call <vscale x 16 x i1> @llvm.aarch64.sve.rdffr()
14 ret <vscale x 16 x i1> %out
17 declare <vscale x 16 x i1> @llvm.aarch64.sve.rdffr()
19 attributes #0 = { "target-features"="+sve" }