brintos

brintos / llvm-project-archived public Read only

0
0
Text · 770 B · dda0b6d Raw
28 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt < %s --passes=instcombine -S | FileCheck %s3 4; This would crash if we didn't check for a negative shift.5; https://github.com/llvm/llvm-project/issues/564246define i64 @PR56424(i1 %cond, i32 %arg) {7; CHECK-LABEL: @PR56424(8; CHECK-NEXT:  entry:9; CHECK-NEXT:    br i1 [[COND:%.*]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]10; CHECK:       if.then:11; CHECK-NEXT:    br label [[IF_END]]12; CHECK:       if.end:13; CHECK-NEXT:    ret i64 014;15entry:16  br i1 %cond, label %if.then, label %if.end17 18if.then:19  %shr  = ashr i32 %arg, -220  %sext = sext i32 %shr to i6421  br label %if.end22 23if.end:24  %val = phi i64 [ %sext, %if.then ], [ 0, %entry ]25  %and = and i64 -81, %val26  ret i64 %and27}28