[PATCH] D44402: [DAGCombiner] Fold (zext (and/or/xor (shl/shr (load x), cst), cst))

Guozhi Wei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 23 12:56:50 PDT 2018


Carrot updated this revision to Diff 139641.
Carrot added a comment.
Herald added a subscriber: javed.absar.

The previous revision caused PR36873. The problem is for some targets, the VT of shift constant may be larger than the other operand. So for the extended shift, we can't simply use the result VT as the constant VT, instead we should use the max of result VT and the original constant VT.


https://reviews.llvm.org/D44402

Files:
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  test/CodeGen/AArch64/zext-logic-shift-load.ll
  test/CodeGen/ARM/zext-logic-shift-load.ll
  test/CodeGen/X86/zext-logicop-shift-load.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44402.139641.patch
Type: text/x-patch
Size: 8685 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180323/c45f8fcd/attachment.bin>


More information about the llvm-commits mailing list