Skip to content

Commit 8412616

Browse files
committed
[NewGVN] Restore old code to placate buildbots.
Apparently my suggestion of using ternary doesn't really work as clang complains about incompatible types on LHS and RHS. Some GCC versions happen to accept the code but clang behaviour is correct here. llvm-svn: 290822
1 parent 999266a commit 8412616

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

llvm/lib/Transforms/Scalar/NewGVN.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -780,8 +780,12 @@ const Expression *NewGVN::performSymbolicCallEvaluation(Instruction *I,
780780
// Update the memory access equivalence table to say that From is equal to To,
781781
// and return true if this is different from what already existed in the table.
782782
bool NewGVN::setMemoryAccessEquivTo(MemoryAccess *From, MemoryAccess *To) {
783-
DEBUG(dbgs() << "Setting " << *From << " equivalent to "
784-
<< (To ? "itself" : *To) << "\n");
783+
DEBUG(dbgs() << "Setting " << *From << " equivalent to ");
784+
if (!To)
785+
DEBUG(dbgs() << "itself");
786+
else
787+
DEBUG(dbgs() << *To);
788+
DEBUG(dbgs() << "\n");
785789
auto LookupResult = MemoryAccessEquiv.find(From);
786790
bool Changed = false;
787791
// If it's already in the table, see if the value changed.

0 commit comments

Comments
 (0)