[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
Mon Mar 11 12:15:37 PDT 2019


qcolombet created this revision.
qcolombet added reviewers: aditya_nandakumar, volkan.
Herald added subscribers: jdoerfert, Petar.Avramovic, kristof.beyls, rovka.
Herald added a project: LLVM.

  getConstantVRegVal used to only look for G_CONSTANT when looking at
  unboxing the value of a vreg. However, constants are sometimes not
  directly used and are hidden behind trunc or s|zext chain of computation.
  
  In particular this may be introduced by the legalization process that
  doesn't want simplify these patterns because it can lead to infine loop
  when legalizing a constant.


Repository:
  rL LLVM

https://reviews.llvm.org/D59227

Files:
  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.190137.patch
Type: text/x-patch
Size: 5642 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190311/f6bb118f/attachment.bin>


More information about the llvm-commits mailing list