brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.8 KiB · acdf32d Raw
68 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt -S -passes=slp-vectorizer -mtriple=aarch64 < %s | FileCheck %s3 4target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"5 6define void @signed(ptr %x, ptr %y, i32 %n) {7; CHECK-LABEL: @signed(8; CHECK-NEXT:  entry:9; CHECK-NEXT:    [[TMP0:%.*]] = load <4 x float>, ptr [[X:%.*]], align 410; CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i32> @llvm.fptosi.sat.v4i32.v4f32(<4 x float> [[TMP0]])11; CHECK-NEXT:    store <4 x i32> [[TMP1]], ptr [[Y:%.*]], align 412; CHECK-NEXT:    ret void13;14entry:15  %l0 = load float, ptr %x, align 416  %arrayidx.1 = getelementptr inbounds float, ptr %x, i64 117  %l2 = load float, ptr %arrayidx.1, align 418  %arrayidx.2 = getelementptr inbounds float, ptr %x, i64 219  %l4 = load float, ptr %arrayidx.2, align 420  %arrayidx.3 = getelementptr inbounds float, ptr %x, i64 321  %l6 = load float, ptr %arrayidx.3, align 422  %l1 = tail call i32 @llvm.fptosi.sat.i32.f32(float %l0)23  %l3 = tail call i32 @llvm.fptosi.sat.i32.f32(float %l2)24  %l5 = tail call i32 @llvm.fptosi.sat.i32.f32(float %l4)25  %l7 = tail call i32 @llvm.fptosi.sat.i32.f32(float %l6)26  store i32 %l1, ptr %y, align 427  %arrayidx2.1 = getelementptr inbounds i32, ptr %y, i64 128  store i32 %l3, ptr %arrayidx2.1, align 429  %arrayidx2.2 = getelementptr inbounds i32, ptr %y, i64 230  store i32 %l5, ptr %arrayidx2.2, align 431  %arrayidx2.3 = getelementptr inbounds i32, ptr %y, i64 332  store i32 %l7, ptr %arrayidx2.3, align 433  ret void34}35 36define void @unsigned(ptr %x, ptr %y, i32 %n) {37; CHECK-LABEL: @unsigned(38; CHECK-NEXT:  entry:39; CHECK-NEXT:    [[TMP0:%.*]] = load <4 x float>, ptr [[X:%.*]], align 440; CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i32> @llvm.fptoui.sat.v4i32.v4f32(<4 x float> [[TMP0]])41; CHECK-NEXT:    store <4 x i32> [[TMP1]], ptr [[Y:%.*]], align 442; CHECK-NEXT:    ret void43;44entry:45  %l0 = load float, ptr %x, align 446  %arrayidx.1 = getelementptr inbounds float, ptr %x, i64 147  %l2 = load float, ptr %arrayidx.1, align 448  %arrayidx.2 = getelementptr inbounds float, ptr %x, i64 249  %l4 = load float, ptr %arrayidx.2, align 450  %arrayidx.3 = getelementptr inbounds float, ptr %x, i64 351  %l6 = load float, ptr %arrayidx.3, align 452  %l1 = tail call i32 @llvm.fptoui.sat.i32.f32(float %l0)53  %l3 = tail call i32 @llvm.fptoui.sat.i32.f32(float %l2)54  %l5 = tail call i32 @llvm.fptoui.sat.i32.f32(float %l4)55  %l7 = tail call i32 @llvm.fptoui.sat.i32.f32(float %l6)56  store i32 %l1, ptr %y, align 457  %arrayidx2.1 = getelementptr inbounds i32, ptr %y, i64 158  store i32 %l3, ptr %arrayidx2.1, align 459  %arrayidx2.2 = getelementptr inbounds i32, ptr %y, i64 260  store i32 %l5, ptr %arrayidx2.2, align 461  %arrayidx2.3 = getelementptr inbounds i32, ptr %y, i64 362  store i32 %l7, ptr %arrayidx2.3, align 463  ret void64}65 66declare i32 @llvm.fptosi.sat.i32.f32(float)67declare i32 @llvm.fptoui.sat.i32.f32(float)68