Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[llvm][MIRVRegNamerUtils] Adding hashing on CImm / FPImm MachineOpera…
…nds. This patch makes it so that cases where multiple instructions that differ only in their ConstantInt or ConstantFP MachineOperand values no longer collide. For instance: %0:_(s1) = G_CONSTANT i1 true %1:_(s1) = G_CONSTANT i1 false %2:_(s32) = G_FCONSTANT float 1.0 %3:_(s32) = G_FCONSTANT float 0.0 Prior to this patch the first two instructions would collide together. Also, the last two G_FCONSTANT instructions would also collide. Now they will no longer collide. Differential Revision: https://reviews.llvm.org/D71558
- Loading branch information
Showing
2 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# RUN: llc -run-pass mir-canonicalizer -o - %s | FileCheck %s | ||
--- | ||
name: cimm_fpimm_hash_test | ||
body: | | ||
bb.0: | ||
; CHECK: _1:_(s1) = G_CONSTANT i1 true | ||
; CHECK: _1:_(s1) = G_CONSTANT i1 false | ||
; CHECK: _1:_(s32) = G_FCONSTANT float | ||
; CHECK: _1:_(s32) = G_FCONSTANT float | ||
%0:_(s1) = G_CONSTANT i1 true | ||
%1:_(s1) = G_CONSTANT i1 false | ||
%2:_(s32) = G_FCONSTANT float 1.0 | ||
%3:_(s32) = G_FCONSTANT float 0.0 | ||
... |