[PATCH] D86789: [DAGCombiner] Fold an AND of a masked load into a zext_masked_load

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 29 06:07:06 PDT 2020


dmgreen added reviewers: craig.topper, spatel, RKSimon.
dmgreen added inline comments.
Herald added a subscriber: danielkiss.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:5299
+        bool ValidZExt = true;
+        for (unsigned int i = 0; i < BVec->getNumOperands(); i++) {
+          SDValue Operand = BVec->getOperand(i);
----------------
Can this make use of the BuildVectorSDNode::getConstantSplatNode or isBuildVectorOfConstantSDNodes or something like it?


================
Comment at: llvm/test/CodeGen/Thumb2/mve-zext-masked-load.ll:2
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -mtriple=thumbv8.1m.main-none-none-eabi -mattr=+mve.fp,+fp64 -verify-machineinstrs -o - %s | FileCheck %s
+
----------------
It can be good to show before and after in the tests, to make the differences clearer.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86789/new/

https://reviews.llvm.org/D86789



More information about the llvm-commits mailing list