aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/InlineFunction.cpp
diff options
context:
space:
mode:
authorKai Nacke <kai.peter.nacke@ibm.com>2022-09-03 16:04:55 +0000
committerKai Nacke <kai.peter.nacke@ibm.com>2022-09-18 00:00:15 +0000
commitae35188f973eb77f5fb22e55d0b8bdac0d15e89b (patch)
tree657c3c69bcd90bbf00435a539784fd0f4784c99c /llvm/lib/Transforms/Utils/InlineFunction.cpp
parent6e4fbd2f511cbfbabb516570f8406739f0e26148 (diff)
downloadllvm-ae35188f973eb77f5fb22e55d0b8bdac0d15e89b.zip
llvm-ae35188f973eb77f5fb22e55d0b8bdac0d15e89b.tar.gz
llvm-ae35188f973eb77f5fb22e55d0b8bdac0d15e89b.tar.bz2
[GISel] Fix match tree emitter.
The following changes are necessasy to get the generated tree matcher to compile: - In CodeExpansions::declare(), the assert() prevents connecting two instructions. E.g. the match code (match (MUL $t, $s1, $s2), (SUB $d, $t, $s3)), results in two declarations of $t, one for the def and one for the use. Removing the assertion allows this construct. If $t is later used, it is one of the operands, which should be perfectly fine. - The code emitted in GIMatchTreeVRegDefPartitioner::generatePartitionSelectorCode() is not compilable: - The value of NewInstrID should be emitted, not the name - Both calls involving getOperand() end with one parenthesis too many - Swaps generated condition for the partition code in the latter function It also changes the rules i2p_to_p2i, fabs_fabs_fold, and fneg_fneg_fold to use the tree matcher for a linear match. These rules are tested by: CodeGen/AArch64/GlobalISel/combine-fabs.mir CodeGen/AArch64/GlobalISel/combine-fneg.mir CodeGen/AArch64/GlobalISel/combine-ptrtoint.mir CodeGen/AMDGPU/GlobalISel/combine-add-nullptr.mir Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D133257
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
0 files changed, 0 insertions, 0 deletions