[all-commits] [llvm/llvm-project] a7b9d7: [DAGCombiner] Move or/xor/and opcode check in Redu...
Craig Topper via All-commits
all-commits at lists.llvm.org
Fri Apr 15 16:42:36 PDT 2022
Author: Craig Topper <craig.topper at sifive.com>
Date: 2022-04-15 (Fri, 15 Apr 2022)
[DAGCombiner] Move or/xor/and opcode check in ReduceLoadOpStoreWidth before hasOneUse check.
hasOneUse is not cheap on nodes with chain results that might have
many uses. By checking the opcode first, we can avoid a costly walk
of the use list on nodes we aren't interested in.
Found by investigating calls to hasNUsesOfValue from the example
provided in D123857.
More information about the All-commits