[llvm-commits] CVS: llvm/test/Regression/CodeGen/X86/2005-01-17-CycleInDAG.ll

Chris Lattner lattner at cs.uiuc.edu
Sun Jan 16 22:26:13 PST 2005



Changes in directory llvm/test/Regression/CodeGen/X86:

2005-01-17-CycleInDAG.ll added (r1.1)
---
Log message:

New testcase for a problem that occurred in 132.ijpeg


---
Diffs of the changes:  (+16 -0)

Index: llvm/test/Regression/CodeGen/X86/2005-01-17-CycleInDAG.ll
diff -c /dev/null llvm/test/Regression/CodeGen/X86/2005-01-17-CycleInDAG.ll:1.1
*** /dev/null	Mon Jan 17 00:26:09 2005
--- llvm/test/Regression/CodeGen/X86/2005-01-17-CycleInDAG.ll	Mon Jan 17 00:25:59 2005
***************
*** 0 ****
--- 1,16 ----
+ ; This testcase was distilled from 132.ijpeg.  Bsaically we cannot fold the
+ ; load into the sub instruction here as it induces a cycle in the dag, which
+ ; is invalid code (there is no correct way to order the instruction).  Check
+ ; that we do not fold the load into the sub.
+ 
+ ; RUN: llvm-as < %s | llc -march=x86 -disable-pattern-isel=0 | not grep 'sub.*GLOBAL'
+ 
+ %GLOBAL = external global int
+ 
+ int %test(int* %P1, int* %P2, int* %P3) {
+    %L = load int* %GLOBAL
+    store int 12, int* %P2
+    %Y = load int* %P3
+    %Z = sub int %Y, %L
+    ret int %Z
+ }






More information about the llvm-commits mailing list