[llvm-branch-commits] [llvm] 45b08c4 - [PowerPC] Set SubRegIndex offset for sub_vsx1/sub_pair1

Jinsong Ji via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Dec 8 20:00:42 PST 2020


Author: Jinsong Ji
Date: 2020-12-08T22:56:44-05:00
New Revision: 45b08c41bfb04684abfbd846e2924177dbcddd04

URL: https://github.com/llvm/llvm-project/commit/45b08c41bfb04684abfbd846e2924177dbcddd04
DIFF: https://github.com/llvm/llvm-project/commit/45b08c41bfb04684abfbd846e2924177dbcddd04.diff

LOG: [PowerPC] Set SubRegIndex offset for sub_vsx1/sub_pair1

We defined SubRegIndex for 256/512 regs,
but we did not set the offset for higher part,
so the offset of lower and higher part are the same.
This may cause problem in assessing ranges of SubReg,
it is great that this haven't affected any testcases,
but I think we should fix it to avoid hidden bugs in the future.

Reviewed By: bsaleil, #powerpc

Differential Revision: https://reviews.llvm.org/D92864

Added: 
    

Modified: 
    llvm/lib/Target/PowerPC/PPCRegisterInfo.td

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/PowerPC/PPCRegisterInfo.td b/llvm/lib/Target/PowerPC/PPCRegisterInfo.td
index 38ee19c72712..e03617aa75ff 100644
--- a/llvm/lib/Target/PowerPC/PPCRegisterInfo.td
+++ b/llvm/lib/Target/PowerPC/PPCRegisterInfo.td
@@ -17,9 +17,9 @@ def sub_un : SubRegIndex<1, 3>;
 def sub_32 : SubRegIndex<32>;
 def sub_64 : SubRegIndex<64>;
 def sub_vsx0 : SubRegIndex<128>;
-def sub_vsx1 : SubRegIndex<128>;
+def sub_vsx1 : SubRegIndex<128, 128>;
 def sub_pair0 : SubRegIndex<256>;
-def sub_pair1 : SubRegIndex<256>;
+def sub_pair1 : SubRegIndex<256, 256>;
 }
 
 


        


More information about the llvm-branch-commits mailing list