21 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt -passes=instcombine -S < %s | FileCheck %s3 4define i8 @simplify_lshr_with_exact(i8 %x) {5; CHECK-LABEL: @simplify_lshr_with_exact(6; CHECK-NEXT: ret i8 27;8 %shr = lshr exact i8 6, %x9 %r = and i8 %shr, 210 ret i8 %r11}12 13define i8 @simplify_ashr_with_exact(i8 %x) {14; CHECK-LABEL: @simplify_ashr_with_exact(15; CHECK-NEXT: ret i8 216;17 %shr = ashr exact i8 -122, %x18 %r = and i8 %shr, 219 ret i8 %r20}21