mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-25 21:11:25 +00:00
[InstCombine] Add additional test for invert of lshr (NFC)
This commit is contained in:
parent
852f6be696
commit
7007919cfd
@ -524,3 +524,15 @@ define i8 @lshr_not_nneg(i8 %x, i8 %y) {
|
||||
%shr.not = xor i8 %shr, -1
|
||||
ret i8 %shr.not
|
||||
}
|
||||
|
||||
define i8 @lshr_not_nneg2(i8 %x) {
|
||||
; CHECK-LABEL: @lshr_not_nneg2(
|
||||
; CHECK-NEXT: [[SHR:%.*]] = lshr i8 [[X:%.*]], 1
|
||||
; CHECK-NEXT: [[SHR_NOT1:%.*]] = or i8 [[SHR]], -128
|
||||
; CHECK-NEXT: ret i8 [[SHR_NOT1]]
|
||||
;
|
||||
%x.not = xor i8 %x, -1
|
||||
%shr = lshr i8 %x.not, 1
|
||||
%shr.not = xor i8 %shr, -1
|
||||
ret i8 %shr.not
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user