[all-commits] [llvm/llvm-project] 377b0e: [TableGen] Don't elide bitconverts in PatFrag frag...
Simon Tatham via All-commits
all-commits at lists.llvm.org
Mon Feb 17 01:30:59 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 377b0e2b06f90c4edbd320cf9d833af5979f8f5d
https://github.com/llvm/llvm-project/commit/377b0e2b06f90c4edbd320cf9d833af5979f8f5d
Author: Simon Tatham <simon.tatham at arm.com>
Date: 2020-02-17 (Mon, 17 Feb 2020)
Changed paths:
A llvm/test/TableGen/simplify-patfrag.td
M llvm/utils/TableGen/CodeGenDAGPatterns.cpp
Log Message:
-----------
[TableGen] Don't elide bitconverts in PatFrag fragments.
Summary:
In the DAG pattern backend, `SimplifyTree` simplifies a pattern by
removing bitconverts between two identical types. But that function is
also run on the fragments list in instances of `PatFrags`, in which
the types haven't been specified yet. So the input and output of the
bitconvert always evaluate to the empty set of types, which makes them
compare equal. So the test always passes, and bitconverts are
unconditionally removed from the PatFrag RHS.
Fixed by spotting the empty type set and using it to inhibit the
optimization.
Reviewers: nhaehnle, hfinkel
Reviewed By: nhaehnle
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D74627
More information about the All-commits
mailing list