Loads and stores can't be inlined. This fixes test/Singlesource/matrixTranspose
authorNick Hildenbrandt <hldnbrnd@uiuc.edu>
Wed, 6 Nov 2002 20:07:54 +0000 (20:07 +0000)
committerNick Hildenbrandt <hldnbrnd@uiuc.edu>
Wed, 6 Nov 2002 20:07:54 +0000 (20:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4579 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/CBackend/CBackend.cpp
lib/Target/CBackend/Writer.cpp

index bd2e37647ef812e8333c218fc3d3f2d437a6c010..cdbe62d104cb4e3b1cb3c8287f16928714e52c92 100644 (file)
@@ -94,7 +94,8 @@ namespace {
       // Must be an expression, must be used exactly once.  If it is dead, we
       // emit it inline where it would go.
       if (I.getType() == Type::VoidTy || I.use_size() != 1 ||
-          isa<TerminatorInst>(I) || isa<CallInst>(I) || isa<PHINode>(I))
+          isa<TerminatorInst>(I) || isa<CallInst>(I) || isa<PHINode>(I) || 
+          isa<LoadInst>(I)) // Don't inline a load across a store!
         return false;
 
       // Only inline instruction it it's use is in the same BB as the inst.
index bd2e37647ef812e8333c218fc3d3f2d437a6c010..cdbe62d104cb4e3b1cb3c8287f16928714e52c92 100644 (file)
@@ -94,7 +94,8 @@ namespace {
       // Must be an expression, must be used exactly once.  If it is dead, we
       // emit it inline where it would go.
       if (I.getType() == Type::VoidTy || I.use_size() != 1 ||
-          isa<TerminatorInst>(I) || isa<CallInst>(I) || isa<PHINode>(I))
+          isa<TerminatorInst>(I) || isa<CallInst>(I) || isa<PHINode>(I) || 
+          isa<LoadInst>(I)) // Don't inline a load across a store!
         return false;
 
       // Only inline instruction it it's use is in the same BB as the inst.