mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
ddb3eafc32
assertion failures in extreme cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102042 91177308-0d34-0410-b5e6-96231b3b80d8
40 lines
618 B
LLVM
40 lines
618 B
LLVM
; RUN: opt -analyze -scalar-evolution < %s | FileCheck %s
|
|
|
|
; ScalarEvolution shouldn't attempt to interpret expressions which have
|
|
; undefined results.
|
|
|
|
define void @foo(i64 %x) {
|
|
|
|
%a = udiv i64 %x, 0
|
|
; CHECK: --> (%x /u 0)
|
|
|
|
%B = shl i64 %x, 64
|
|
; CHECK: --> %B
|
|
|
|
%b = ashr i64 %B, 64
|
|
; CHECK: --> %b
|
|
|
|
%c = lshr i64 %x, 64
|
|
; CHECK: --> %c
|
|
|
|
%d = shl i64 %x, 64
|
|
; CHECK: --> %d
|
|
|
|
%E = shl i64 %x, -1
|
|
; CHECK: --> %E
|
|
|
|
%e = ashr i64 %E, -1
|
|
; CHECK: --> %e
|
|
|
|
%f = lshr i64 %x, -1
|
|
; CHECK: --> %f
|
|
|
|
%g = shl i64 %x, -1
|
|
; CHECK: --> %g
|
|
|
|
%h = bitcast i64 undef to i64
|
|
; CHECK: --> undef
|
|
|
|
ret void
|
|
}
|