Skip to content
Unverified Commit 20bf0cf2 authored by Roman Lebedev's avatar Roman Lebedev
Browse files

[TargetLowering] optimizeSetCCToComparisonWithZero(): add extra sanity checks (PR43769)

We should do the fold only if both constants are plain,
non-opaque constants, at least that is the DAG.FoldConstantArithmetic()
requirement.
And if the constant we are comparing with is zero - we shouldn't be
trying to do this fold in the first place.

Fixes https://bugs.llvm.org/show_bug.cgi?id=43769
parent d052a578
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment