brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · b4efe61 Raw
40 lines · plain
1; RUN: opt -S -passes=instcombine < %s | FileCheck %s2 3@c = common global i8 0, align 14@a = common global i8 0, align 15@b = common global i8 0, align 16 7define void @func() nounwind uwtable ssp {8entry:9  %0 = load i8, ptr @c, align 110  %conv = zext i8 %0 to i3211  %or = or i32 %conv, 112  %conv1 = trunc i32 %or to i813  store i8 %conv1, ptr @a, align 114  %conv2 = zext i8 %conv1 to i3215  %neg = xor i32 %conv2, -116  %and = and i32 1, %neg17  %conv3 = trunc i32 %and to i818  store i8 %conv3, ptr @b, align 119  %1 = load i8, ptr @a, align 120  %conv4 = zext i8 %1 to i3221  %conv5 = zext i8 %conv3 to i3222  %tobool = icmp ne i32 %conv4, 023  br i1 %tobool, label %land.rhs, label %land.end24 25land.rhs:                                         ; preds = %entry26  %tobool8 = icmp ne i32 %conv5, 027  br label %land.end28 29land.end:                                         ; preds = %land.rhs, %entry30  %2 = phi i1 [ false, %entry ], [ %tobool8, %land.rhs ]31  %land.ext = zext i1 %2 to i3232  %mul = mul nsw i32 3, %land.ext33  %conv9 = trunc i32 %mul to i834  store i8 %conv9, ptr @a, align 135  ret void36 37; CHECK-LABEL: @func(38; CHECK-NOT: select39}40