brintos

brintos / llvm-project-archived public Read only

0
0
Text · 922 B · c9ea315 Raw
22 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 52; RUN: opt -passes=early-cse -S %s | FileCheck %s3 4define i32 @samesign_hash_bug(i16 %v) {5; CHECK-LABEL: define i32 @samesign_hash_bug(6; CHECK-SAME: i16 [[V:%.*]]) {7; CHECK-NEXT:    [[ZEXT:%.*]] = zext i16 [[V]] to i328; CHECK-NEXT:    [[ICMP_SAMESIGN:%.*]] = icmp ugt i32 [[ZEXT]], 319; CHECK-NEXT:    [[SELECT_ICMP_SAMESIGN:%.*]] = select i1 [[ICMP_SAMESIGN]], i32 0, i32 110; CHECK-NEXT:    [[SELECT_ICMP:%.*]] = select i1 [[ICMP_SAMESIGN]], i32 1, i32 011; CHECK-NEXT:    ret i32 [[SELECT_ICMP]]12;13  %zext = zext i16 %v to i3214  %icmp.samesign = icmp samesign ugt i32 %zext, 3115  %select.icmp.samesign = select i1 %icmp.samesign, i32 0, i32 116  %ashr = ashr i32 0, %select.icmp.samesign17  %icmp = icmp ugt i32 %zext, 3118  %select.icmp = select i1 %icmp, i32 1, i32 019  %ret = add i32 %ashr, %select.icmp20  ret i32 %ret21}22