[llvm] [PowerPC] 32-bit large code-model support for toc-data (PR #85129)
Chen Zheng via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 21 01:03:48 PDT 2024
================
@@ -96,6 +122,15 @@ define dso_local float @read_float() {
; TEST64: la 3, f[TD](2)
; TEST64-NEXT: lfs 1, 0(3)
+; CHECK32LARGE: name: read_float
+; CHECK32LARGE: %[[SCRATCH1:[0-9]+]]:gprc_and_gprc_nor0 = ADDIStocHA $r2, @f
+; CHECK32LARGE-NEXT: %[[SCRATCH2:[0-9]+]]:gprc_and_gprc_nor0 = ADDItocL killed %[[SCRATCH1]], @f
+; CHECK32LARGE-NEXT: LFS 0, killed %[[SCRATCH2]] :: (dereferenceable load (s32) from @f)
+
+; TEST32LARGE: .read_float:
+; TEST32LARGE: addis 3, f[TD]@u(2)
+; TEST32LARGE-NEXT: la 3, f[TD]@l(3)
+; TEST32LARGE-NEXT: lfs 1, 0(3)
----------------
chenzheng1030 wrote:
Same here, the `la` should be able to merge into the latter `lfs`?
https://github.com/llvm/llvm-project/pull/85129
More information about the llvm-commits
mailing list