brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 5dd5a26 Raw
57 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 52; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s --check-prefix=LINUXASM3; RUN: llc < %s -mtriple=powerpc-ibm-aix-xcoff | FileCheck %s --check-prefix=AIXASM4 5define noundef i32 @add(i32 noundef %a, i32 noundef %b, ptr nocapture noundef writeonly %ovf) {6; LINUXASM-LABEL: add:7; LINUXASM:       # %bb.0: # %entry8; LINUXASM-NEXT:    li 6, 09; LINUXASM-NEXT:    addc 3, 3, 410; LINUXASM-NEXT:    addze 4, 611; LINUXASM-NEXT:    stw 4, 0(5)12; LINUXASM-NEXT:    blr13 14; AIXASM-LABEL: .add:15; AIXASM:       # %bb.0:                                # %entry16; AIXASM-NEXT:    addc 3, 3, 417; AIXASM-NEXT:    li 4, 018; AIXASM-NEXT:    addze 4, 419; AIXASM-NEXT:    stw 4, 0(5)20; AIXASM-NEXT:    blr21 22entry:23  %0 = tail call { i32, i1 } @llvm.uadd.with.overflow.i32(i32 %a, i32 %b)24  %1 = extractvalue { i32, i1 } %0, 125  %2 = extractvalue { i32, i1 } %0, 026  %3 = zext i1 %1 to i3227  store i32 %3, ptr %ovf, align 828  ret i32 %229}30 31declare { i32, i1 } @llvm.uadd.with.overflow.i32(i32, i32)32 33define noundef zeroext i1 @add_overflow(i32 noundef %a, i32 noundef %b, ptr nocapture noundef writeonly %ovf) {34; LINUXASM-LABEL: add_overflow:35; LINUXASM:       # %bb.0: # %entry36; LINUXASM-NEXT:    li 6, 037; LINUXASM-NEXT:    addc 4, 3, 438; LINUXASM-NEXT:    addze 3, 639; LINUXASM-NEXT:    stw 4, 0(5)40; LINUXASM-NEXT:    blr41 42; AIXASM-LABEL: .add_overflow:43; AIXASM:       # %bb.0:                                # %entry44; AIXASM-NEXT:    addc 4, 3, 445; AIXASM-NEXT:    li 3, 046; AIXASM-NEXT:    addze 3, 347; AIXASM-NEXT:    stw 4, 0(5)48; AIXASM-NEXT:    blr49 50entry:51  %0 = tail call { i32, i1 } @llvm.uadd.with.overflow.i32(i32 %a, i32 %b)52  %1 = extractvalue { i32, i1 } %0, 153  %2 = extractvalue { i32, i1 } %0, 054  store i32 %2, ptr %ovf, align 855  ret i1 %156}57