summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/CodeGen/GlobalISel/ConstantFoldingTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [GISel] Allow getConstantVRegVal() to return G_FCONSTANT values.Marcello Maggioni2019-10-101-0/+168
| | | | | | | | | | | | | | | | | | | | | In GISel we have both G_CONSTANT and G_FCONSTANT, but because in GISel we don't really have a concept of Float vs Int value the only difference between the two is where the data originates from. What both G_CONSTANT and G_FCONSTANT return is just a bag of bits with the constant representation in it. By making getConstantVRegVal() return G_FCONSTANTs bit representation as well we allow ConstantFold and other things to operate with G_FCONSTANT. Adding tests that show ConstantFolding to work on mixed G_CONSTANT and G_FCONSTANT sources. Differential Revision: https://reviews.llvm.org/D68739 llvm-svn: 374458
* [GISel] Refactor and split PatternMatchTest. NFCMarcello Maggioni2019-10-091-0/+71
Split the ConstantFold part into a separate file and make it use the fixture GISelMITest. llvm-svn: 374245
OpenPOWER on IntegriCloud