Fix a nasty bug that caused areAliases to always return false.
authorChris Lattner <sabre@nondot.org>
Fri, 4 Jun 2004 17:03:11 +0000 (17:03 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 4 Jun 2004 17:03:11 +0000 (17:03 +0000)
Bug fix courtesy of Anshu Dasgupta

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14011 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/MRegisterInfo.h

index e54a354f138b69621f09e5606ba7850b59f00a67..1268749c459a571d825e2ae351eebd6165103277 100644 (file)
@@ -196,7 +196,7 @@ public:
   /// false otherwise
   bool areAliases(unsigned regA, unsigned regB) const {
     for (const unsigned *Alias = getAliasSet(regA); *Alias; ++Alias)
-      if (*Alias == regA) return true;
+      if (*Alias == regB) return true;
     return false;
   }