[llvm] [DAGCombiner] Allow tryToFoldExtOfLoad to use a sextload for zext nneg. (PR #81714)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 14 00:19:42 PST 2024


================
@@ -13170,15 +13177,23 @@ static SDValue tryToFoldExtOfLoad(SelectionDAG &DAG, DAGCombiner &Combiner,
        !TLI.isLoadExtLegal(ExtLoadType, VT, N0.getValueType())))
----------------
nikic wrote:

What about this legality check? Could we end up producing an illegal sextload?

https://github.com/llvm/llvm-project/pull/81714


More information about the llvm-commits mailing list