brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 08e7e9f Raw
60 lines · plain
1; RUN: llc < %s -mtriple=arm64-apple-darwin  | FileCheck %s2; Checks for conditional branch b.vs3 4; Function Attrs: nounwind5define i32 @add(i32, i32) {6entry:7  %2 = tail call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 %0, i32 %1)8  %3 = extractvalue { i32, i1 } %2, 19  br i1 %3, label %6, label %410 11; <label>:4                                       ; preds = %entry12  %5 = extractvalue { i32, i1 } %2, 013  ret i32 %514 15; <label>:6                                       ; preds = %entry16  tail call void @llvm.trap()17  unreachable18; CHECK: b.vs19}20 21%S64 = type <{ i64 }>22%S32 = type <{ i32 }>23%Sstruct = type <{ %S64, %S32 }>24 25; Checks for compfail when optimizing csincr-cbz sequence26 27define { i64, i1 } @foo(ptr , ptr , i1, i64) {28entry:29  %.sroa.0 = alloca i72, align 1630  %4 = load i64, ptr %1, align 831  %.repeatedValue.value = getelementptr inbounds %Sstruct, ptr %1, i64 0, i32 1, i32 032  %5 = load i32, ptr %.repeatedValue.value, align 833  %6 = icmp eq i64 %4, 034  br label %735 36; <label>:7                                      ; preds = %entry37  %.mask58 = and i32 %5, -204838  %8 = icmp eq i32 %.mask58, 5529639  %.not134 = xor i1 %8, true40  %9 = icmp eq i32 %5, 111411241  %or.cond135 = and i1 %9, %.not13442  br i1 %or.cond135, label %10, label %.loopexit43 44; <label>:10                                      ; preds = %745  %11 = and i32 %5, -204846  %12 = icmp eq i32 %11, 5529647  br i1 %12, label %.loopexit, label %1048 49 50.loopexit:                                        ; preds = %.entry,%7,%1051  tail call void @llvm.trap()52  unreachable53}54 55; Function Attrs: nounwind readnone56declare { i32, i1 } @llvm.sadd.with.overflow.i32(i32, i32)57 58; Function Attrs: noreturn nounwind59declare void @llvm.trap()60