Skip to content

Commit a84bc7a

Browse files
committed
[GVN] Fix empty check.
1 parent 6556d1b commit a84bc7a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Transforms/Scalar/GVN.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,7 @@ struct llvm::GVNPass::Expression {
156156
return false;
157157
if (varargs != other.varargs)
158158
return false;
159-
if (attrs.isEmpty() != other.attrs.isEmpty())
160-
return false;
161-
if (!attrs.isEmpty() &&
159+
if (!attrs.isEmpty() && !other.attrs.isEmpty() &&
162160
!attrs.intersectWith(type->getContext(), other.attrs).has_value())
163161
return false;
164162
return true;

0 commit comments

Comments
 (0)