source: icGREP/icgrep-devel/llvm-3.8.0.src/test/Analysis/ScalarEvolution/undefined.ll @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 618 bytes
Line 
1; RUN: opt -analyze -scalar-evolution < %s | FileCheck %s
2
3; ScalarEvolution shouldn't attempt to interpret expressions which have
4; undefined results.
5
6define 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}
Note: See TracBrowser for help on using the repository browser.