Home | History | Annotate | Download | only in ScalarEvolution
      1 ; RUN: opt -analyze -scalar-evolution < %s | FileCheck %s
      2 
      3 ; ScalarEvolution shouldn't attempt to interpret expressions which have
      4 ; undefined results.
      5 
      6 define void @foo(i64 %x) {
      7 
      8   %a = udiv i64 %x, 0
      9 ; CHECK: -->  (%x /u 0)
     10 
     11   %B = shl i64 %x, 64
     12 ; CHECK: -->  %B
     13 
     14   %b = ashr i64 %B, 64
     15 ; CHECK: -->  %b
     16 
     17   %c = lshr i64 %x, 64
     18 ; CHECK: -->  %c
     19 
     20   %d = shl i64 %x, 64
     21 ; CHECK: -->  %d
     22 
     23   %E = shl i64 %x, -1
     24 ; CHECK: -->  %E
     25 
     26   %e = ashr i64 %E, -1
     27 ; CHECK: -->  %e
     28 
     29   %f = lshr i64 %x, -1
     30 ; CHECK: -->  %f
     31 
     32   %g = shl i64 %x, -1
     33 ; CHECK: -->  %g
     34 
     35   %h = bitcast i64 undef to i64
     36 ; CHECK: -->  undef
     37 
     38   ret void
     39 }
     40