mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
Teach ComputeMaskedBits about nsw on add. I don't think there's anything we can
do with nuw here, but sub and mul should be given similar treatment. Fixes PR9343 #15! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127463 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -261,6 +261,16 @@ define i1 @srem1(i32 %X) {
|
||||
; CHECK: ret i1 false
|
||||
}
|
||||
|
||||
; PR9343 #15
|
||||
; CHECK: @srem2
|
||||
; CHECK: ret i1 false
|
||||
define i1 @srem2(i16 %X, i32 %Y) {
|
||||
%A = zext i16 %X to i32
|
||||
%B = add nsw i32 %A, 1
|
||||
%C = srem i32 %B, %Y
|
||||
%D = icmp slt i32 %C, 0
|
||||
ret i1 %D
|
||||
}
|
||||
define i1 @udiv1(i32 %X) {
|
||||
; CHECK: @udiv1
|
||||
%A = udiv i32 %X, 1000000
|
||||
|
||||
Reference in New Issue
Block a user