brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.3 KiB · 2b6b018 Raw
104 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 52; RUN: llc -mtriple=xtensa -O1 -mattr=+windowed -verify-machineinstrs < %s \3; RUN:   | FileCheck %s -check-prefix=XTENSA4 5; Check placement of first 6 arguments in registers and 7th argument on stack6define dso_local i32 @test1(i32 noundef %a, i32 noundef %b, i32 noundef %c, i32 noundef %d, i32 noundef %e, i32 noundef %f, ptr nocapture noundef readonly byval(i32) align 4 %p) {7; XTENSA-LABEL: test1:8; XTENSA:         .cfi_startproc9; XTENSA-NEXT:  # %bb.0:10; XTENSA-NEXT:    entry a1, 3211; XTENSA-NEXT:    .cfi_def_cfa_offset 3212; XTENSA-NEXT:    add a8, a7, a213; XTENSA-NEXT:    l32i a9, a1, 3214; XTENSA-NEXT:    add a2, a8, a915; XTENSA-NEXT:    retw16  %l = load i32, ptr %p, align 417  %sum = add nsw i32 %f, %a18  %1 = add nsw i32 %sum, %l19  ret i32 %120}21 22; Check placement of second i64 argument in registers23define dso_local i32 @test2(i32 noundef %a, i64 noundef %b, i32 noundef %c) {24; XTENSA-LABEL: test2:25; XTENSA:         .cfi_startproc26; XTENSA-NEXT:  # %bb.0:27; XTENSA-NEXT:    entry a1, 3228; XTENSA-NEXT:    .cfi_def_cfa_offset 3229; XTENSA-NEXT:    add a8, a6, a230; XTENSA-NEXT:    add a2, a8, a431; XTENSA-NEXT:    retw32  %tr = trunc i64 %b to i3233  %sum = add nsw i32 %c, %a34  %1 = add nsw i32 %sum, %tr35  ret i32 %136}37 38; Check placement of first argument typeof i8 in register39define dso_local i32 @test3(i8 noundef signext %a, i64 noundef %b, i32 noundef %c) {40; XTENSA-LABEL: test3:41; XTENSA:         .cfi_startproc42; XTENSA-NEXT:  # %bb.0:43; XTENSA-NEXT:    entry a1, 3244; XTENSA-NEXT:    .cfi_def_cfa_offset 3245; XTENSA-NEXT:    add a8, a2, a646; XTENSA-NEXT:    add a2, a8, a447; XTENSA-NEXT:    retw48  %tr = trunc i64 %b to i3249  %se = sext i8 %a to i3250  %sum = add nsw i32 %se, %c51  %1 = add nsw i32 %sum, %tr52  ret i32 %153}54 55; Check placement of 4th argument typeof i64 on stack56define dso_local i32 @test4(i8 noundef signext %a, i64 noundef %b, i32 noundef %c, ptr nocapture noundef readonly byval(i64) align 8 %p) {57; XTENSA-LABEL: test4:58; XTENSA:         .cfi_startproc59; XTENSA-NEXT:  # %bb.0:60; XTENSA-NEXT:    entry a1, 3261; XTENSA-NEXT:    .cfi_def_cfa_offset 3262; XTENSA-NEXT:    add a8, a2, a663; XTENSA-NEXT:    add a8, a8, a464; XTENSA-NEXT:    l32i a9, a1, 3265; XTENSA-NEXT:    add a2, a8, a966; XTENSA-NEXT:    retw67  %l = load i64, ptr %p, align 868  %tr1 = trunc i64 %b to i3269  %tr2 = trunc i64 %l to i3270  %se = sext i8 %a to i3271  %sum1 = add nsw i32 %se, %c72  %sum2 = add nsw i32 %sum1, %tr173  %1 = add nsw i32 %sum2, %tr274  ret i32 %175}76 77; Check placement of 128 bit structure on registers78define dso_local i32 @test5([4 x i32] %a, i32 noundef %b) {79; XTENSA-LABEL: test5:80; XTENSA:         .cfi_startproc81; XTENSA-NEXT:  # %bb.0:82; XTENSA-NEXT:    entry a1, 3283; XTENSA-NEXT:    .cfi_def_cfa_offset 3284; XTENSA-NEXT:    add a2, a2, a685; XTENSA-NEXT:    retw86  %ev = extractvalue [4 x i32] %a, 087  %1 = add nsw i32 %ev, %b88  ret i32 %189}90 91; Check placement of 128 bit structure on stack92define dso_local i32 @test6(i32 noundef %a, [4 x i32] %b) {93; XTENSA-LABEL: test6:94; XTENSA:         .cfi_startproc95; XTENSA-NEXT:  # %bb.0:96; XTENSA-NEXT:    entry a1, 3297; XTENSA-NEXT:    .cfi_def_cfa_offset 3298; XTENSA-NEXT:    add a2, a3, a299; XTENSA-NEXT:    retw100  %ev = extractvalue [4 x i32] %b, 0101  %1 = add nsw i32 %ev, %a102  ret i32 %1103}104