diff options
| author | Nicolai Haehnle <nhaehnle@gmail.com> | 2018-11-30 14:15:13 +0000 |
|---|---|---|
| committer | Nicolai Haehnle <nhaehnle@gmail.com> | 2018-11-30 14:15:13 +0000 |
| commit | 445b0b6260238f3e59204e6af921447564962004 (patch) | |
| tree | 1b6d43d2dc8333e31fe464aeda870853c219f798 /llvm/test/CodeGen/AMDGPU/llvm.amdgcn.div.fixup.ll | |
| parent | 4830fdd21afd9e4f15cd610422ccab760779ef98 (diff) | |
| download | bcm5719-llvm-445b0b6260238f3e59204e6af921447564962004.tar.gz bcm5719-llvm-445b0b6260238f3e59204e6af921447564962004.zip | |
TableGen/ISel: Allow PatFrag predicate code to access captured operands
Summary:
This simplifies writing predicates for pattern fragments that are
automatically re-associated or commuted.
For example, a followup patch adds patterns for fragments of the form
(add (shl $x, $y), $z) to the AMDGPU backend. Such patterns are
automatically commuted to (add $z, (shl $x, $y)), which makes it basically
impossible to refer to $x, $y, and $z generically in the PredicateCode.
With this change, the PredicateCode can refer to $x, $y, and $z simply
as `Operands[i]`.
Test confirmed that there are no changes to any of the generated files
when building all (non-experimental) targets.
Change-Id: I61c00ace7eed42c1d4edc4c5351174b56b77a79c
Reviewers: arsenm, rampitec, RKSimon, craig.topper, hfinkel, uweigand
Subscribers: wdng, tpr, llvm-commits
Differential Revision: https://reviews.llvm.org/D51994
llvm-svn: 347992
Diffstat (limited to 'llvm/test/CodeGen/AMDGPU/llvm.amdgcn.div.fixup.ll')
0 files changed, 0 insertions, 0 deletions

