[PATCH] D105238: GlobalISel/AArch64: don't optimize away redundant branches at -O0

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 30 23:54:16 PDT 2021


dmgreen added a comment.

Sounds sensible to me. I wouldn't expect -O0 to be doing many optimizations.



================
Comment at: llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp:2097
+  case TargetOpcode::G_BR:
       return false;
   case TargetOpcode::G_SHL:
----------------
The formatting is off now.


================
Comment at: llvm/test/DebugInfo/AArch64/fallthrough-branch.ll:4
+; ModuleID = '/tmp/t.o'
+source_filename = "/tmp/t.o"
+target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
----------------
This test looks like it could be cleaned up quite a bit. It doesn't need debug info for example, as far as I understand. Just a block that fallsthrough.


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

https://reviews.llvm.org/D105238



More information about the llvm-commits mailing list