[PATCH] D103408: Teach peephole optimizer to not emit sub-register defs

Ahsan Saghir via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 25 09:28:00 PDT 2021


saghir marked an inline comment as done.
saghir added inline comments.


================
Comment at: llvm/test/CodeGen/PowerPC/peephole-subreg-def.mir:8-26
+--- |
+  declare i64 @strlen()
+
+  define dso_local fastcc void @test_peephole_subreg_def() {
+  entry:
+    %call413 = call i64 @strlen()
+    %sext1679 = shl i64 %call413, 32
----------------
arsenm wrote:
> saghir wrote:
> > Since I renamed the file, I am writing my response to the earlier comment, of removing the IR section, here for better visibility:
> > 
> > "I have simplified the IR to generate the test case. However, removing the IR section, gives me error for use of undefined global value @strlen."
> You can strip the strlen reference from the MIR, either by replacing with 0 or just deleting the calli. Peephole opt doesn't care about the call here
Thanks for your patience. I have been able to remove the IR section.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103408/new/

https://reviews.llvm.org/D103408



More information about the llvm-commits mailing list