[llvm-commits] CVS: llvm/test/Regression/Transforms/ScalarRepl/phinodepromote.ll select_promote.ll

Chris Lattner lattner at cs.uiuc.edu
Sun Sep 19 11:45:56 PDT 2004



Changes in directory llvm/test/Regression/Transforms/ScalarRepl:

phinodepromote.ll updated: 1.1 -> 1.2
select_promote.ll updated: 1.1 -> 1.2
---
Log message:

Instcombine now helps out with these


---
Diffs of the changes:  (+7 -4)

Index: llvm/test/Regression/Transforms/ScalarRepl/phinodepromote.ll
diff -u llvm/test/Regression/Transforms/ScalarRepl/phinodepromote.ll:1.1 llvm/test/Regression/Transforms/ScalarRepl/phinodepromote.ll:1.2
--- llvm/test/Regression/Transforms/ScalarRepl/phinodepromote.ll:1.1	Sun Jan 11 19:17:42 2004
+++ llvm/test/Regression/Transforms/ScalarRepl/phinodepromote.ll	Sun Sep 19 13:45:45 2004
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | opt -mem2reg | llvm-dis | not grep alloca
+; RUN: llvm-as < %s | opt -instcombine -mem2reg | llvm-dis | not grep alloca
 ;
 ; This tests to see if mem2reg can promote alloca instructions whose addresses
 ; are used by PHI nodes that are immediately loaded.  The LLVM C++ front-end
@@ -6,12 +6,14 @@
 ; lvalues), so handling this simple extension is quite useful.
 ;
 ; This testcase is what the following program looks like when it reaches
-; mem2reg:
+; instcombine:
 ;
 ; template<typename T>
 ; const T& max(const T& a1, const T& a2) { return a1 < a2 ? a1 : a2; }
 ; int main() { return max(0, 1); }
 ;
+; This test checks to make sure the combination of instcombine and mem2reg
+; perform the transformation.
 
 int %main() {
 entry:


Index: llvm/test/Regression/Transforms/ScalarRepl/select_promote.ll
diff -u llvm/test/Regression/Transforms/ScalarRepl/select_promote.ll:1.1 llvm/test/Regression/Transforms/ScalarRepl/select_promote.ll:1.2
--- llvm/test/Regression/Transforms/ScalarRepl/select_promote.ll:1.1	Thu Apr  8 14:59:22 2004
+++ llvm/test/Regression/Transforms/ScalarRepl/select_promote.ll	Sun Sep 19 13:45:45 2004
@@ -1,6 +1,7 @@
-; Test promotion of loads that use the result of a select instruction.
+; Test promotion of loads that use the result of a select instruction.  This
+; should be simplified by the instcombine pass.
 
-; RUN: llvm-as < %s | opt -mem2reg | llvm-dis | not grep alloca
+; RUN: llvm-as < %s | opt -instcombine -mem2reg | llvm-dis | not grep alloca
 
 int %main() {
         %mem_tmp.0 = alloca int         ; <int*> [#uses=3]






More information about the llvm-commits mailing list