mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
ConstantFold: div undef, 0 should fold to undef, not zero
Dividing by zero yields an undefined value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223924 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -188,3 +188,10 @@ define i32 @test23(i32 %a) {
|
||||
%b = lshr exact i32 undef, %a
|
||||
ret i32 %b
|
||||
}
|
||||
|
||||
; CHECK-LABEL: @test24
|
||||
; CHECK: ret i32 undef
|
||||
define i32 @test24(i32 %a) {
|
||||
%b = udiv i32 undef, 0
|
||||
ret i32 %b
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user