brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1004 B · 06c496d Raw
32 lines · plain
1; RUN: llc -O3 -mtriple arm64-apple-ios5.0.0 < %s | FileCheck %s2; <rdar://problem/15992732>3; Zero truncation is not necessary when the values are extended properly4; already.5 6@block = common global ptr null, align 87 8define zeroext i8 @foo(i32 %i1, i32 %i2) {9; CHECK-LABEL: foo:10; CHECK: cset11; CHECK-NOT: and12entry:13  %idxprom = sext i32 %i1 to i6414  %0 = load ptr, ptr @block, align 815  %arrayidx = getelementptr inbounds i8, ptr %0, i64 %idxprom16  %1 = load i8, ptr %arrayidx, align 117  %idxprom1 = sext i32 %i2 to i6418  %arrayidx2 = getelementptr inbounds i8, ptr %0, i64 %idxprom119  %2 = load i8, ptr %arrayidx2, align 120  %cmp = icmp eq i8 %1, %221  br i1 %cmp, label %return, label %if.then22 23if.then:                                          ; preds = %entry24  %cmp7 = icmp ugt i8 %1, %225  %conv9 = zext i1 %cmp7 to i826  br label %return27 28return:                                           ; preds = %entry, %if.then29  %retval.0 = phi i8 [ %conv9, %if.then ], [ 1, %entry ]30  ret i8 %retval.031}32