[llvm-commits] CVS: llvm/test/Transforms/PredicateSimplifier/2007-03-17-OpsToDefVRP.ll
Nick Lewycky
nicholas at mxc.ca
Sat Mar 17 18:09:57 PDT 2007
Changes in directory llvm/test/Transforms/PredicateSimplifier:
2007-03-17-OpsToDefVRP.ll added (r1.1)
---
Log message:
Propagate ValueRanges across equality.
Add some more micro-optimizations: x * 0 = 0, a - x = a --> x = 0.
---
Diffs of the changes: (+19 -0)
2007-03-17-OpsToDefVRP.ll | 19 +++++++++++++++++++
1 files changed, 19 insertions(+)
Index: llvm/test/Transforms/PredicateSimplifier/2007-03-17-OpsToDefVRP.ll
diff -c /dev/null llvm/test/Transforms/PredicateSimplifier/2007-03-17-OpsToDefVRP.ll:1.1
*** /dev/null Sat Mar 17 20:09:42 2007
--- llvm/test/Transforms/PredicateSimplifier/2007-03-17-OpsToDefVRP.ll Sat Mar 17 20:09:32 2007
***************
*** 0 ****
--- 1,19 ----
+ ; RUN: llvm-as < %s | opt -predsimplify | llvm-dis | grep -v %c
+ define void @foo(i8* %X, i8* %Y) {
+ entry:
+ %A = load i8* %X
+ %B = load i8* %Y
+ %a = icmp ult i8 %B, 10
+ br i1 %a, label %cond_true, label %URB
+ cond_true:
+ %b = icmp eq i8 %A, %B
+ br i1 %b, label %cond_true2, label %URB
+ cond_true2:
+ %c = icmp ult i8 %A, 11
+ call i8 @bar(i1 %c)
+ ret void
+ URB:
+ ret void
+ }
+
+ declare i8 @bar(i1)
More information about the llvm-commits
mailing list