[PATCH] D59227: [GlobalISel][Utils] Teach getConstantVRegVal how to look through trunc and z|sext

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 12 16:47:30 PDT 2019


qcolombet updated this revision to Diff 190358.
qcolombet added a comment.

- Introduce a different variant of getConstantVRegVal instead of overriding the existing one (after talking to @aditya_nandakumar we decided we may want to have more control on what happens when we call this function).
- Add a few comments.

Longer term, I believe we don't want to legalize G_CONSTANT, but for this to happen we need to make sure we combine in the builder the extensions, otherwise we will have them hanging around and causing problem.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D59227

Files:
  include/llvm/CodeGen/GlobalISel/Utils.h
  lib/CodeGen/GlobalISel/InstructionSelector.cpp
  lib/CodeGen/GlobalISel/Utils.cpp
  test/CodeGen/X86/GlobalISel/ashr-scalar.ll
  test/CodeGen/X86/GlobalISel/lshr-scalar.ll
  test/CodeGen/X86/GlobalISel/shl-scalar.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59227.190358.patch
Type: text/x-patch
Size: 8286 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190312/65746b94/attachment.bin>


More information about the llvm-commits mailing list