brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 1ae8b56 Raw
37 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt < %s -passes=instcombine -S | FileCheck %s3 4; We used to hit an assertion in getFlippedStrictnessPredicateAndConstant due5; to assuming that edge cases such as %cmp (ult x, 0) already has been6; simplified. But that depends on the worklist order, so that is not always7; guaranteed.8 9define i16 @d(ptr %d.a, ptr %d.b) {10; CHECK-LABEL: @d(11; CHECK-NEXT:  entry:12; CHECK-NEXT:    [[T0:%.*]] = load i16, ptr [[D_A:%.*]], align 113; CHECK-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i16 [[T0]], 014; CHECK-NEXT:    br i1 [[TOBOOL_NOT]], label [[LAND_END:%.*]], label [[LAND_RHS:%.*]]15; CHECK:       land.rhs:16; CHECK-NEXT:    br label [[LAND_END]]17; CHECK:       land.end:18; CHECK-NEXT:    ret i16 -119;20entry:21  %t0 = load i16, ptr %d.a, align 122  %tobool = icmp ne i16 %t0, 023  br i1 %tobool, label %land.rhs, label %land.end24 25land.rhs:26  %t1 = load i16, ptr %d.b, align 127  %cmp = icmp ult i16 %t1, 028  br label %land.end29 30land.end:31  %t2 = phi i1 [ false, %entry ], [ %cmp, %land.rhs ]32  %land.ext = zext i1 %t2 to i1633  %mul = mul nsw i16 %land.ext, 334  %neg = xor i16 %mul, -135  ret i16 %neg36}37