[PATCH] D38262: [AArch64] Use LateSimplifyCFG after expanding atomic operations.
Balaram Makam via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 25 14:32:47 PDT 2017
bmakam created this revision.
Herald added subscribers: kristof.beyls, javed.absar, rengolin, aemerson.
After r308422 we defer optimizations that can destroy loop canonical forms to
LateSimplifyCFG. Running LateSimplifyCFG after expanding atomic operations
can exploit more control-flow opportunities.
https://reviews.llvm.org/D38262
Files:
lib/Target/AArch64/AArch64TargetMachine.cpp
test/CodeGen/AArch64/aarch64-loop-gep-opt.ll
Index: test/CodeGen/AArch64/aarch64-loop-gep-opt.ll
===================================================================
--- test/CodeGen/AArch64/aarch64-loop-gep-opt.ll
+++ test/CodeGen/AArch64/aarch64-loop-gep-opt.ll
@@ -19,9 +19,9 @@
do.body.i:
; CHECK-LABEL: do.body.i:
-; CHECK: %uglygep1 = getelementptr i8, i8* %uglygep, i64 %3
-; CHECK-NEXT: %4 = bitcast i8* %uglygep1 to i32*
-; CHECK-NOT: %uglygep1 = getelementptr i8, i8* %uglygep, i64 1032
+; CHECK: %uglygep2 = getelementptr i8, i8* %uglygep, i64 %3
+; CHECK-NEXT: %4 = bitcast i8* %uglygep2 to i32*
+; CHECK-NOT: %uglygep2 = getelementptr i8, i8* %uglygep, i64 1032
%0 = phi i32 [ 256, %entry ], [ %.be, %do.body.i.backedge ]
Index: lib/Target/AArch64/AArch64TargetMachine.cpp
===================================================================
--- lib/Target/AArch64/AArch64TargetMachine.cpp
+++ lib/Target/AArch64/AArch64TargetMachine.cpp
@@ -365,7 +365,7 @@
// determine whether it succeeded. We can exploit existing control-flow in
// ldrex/strex loops to simplify this, but it needs tidying up.
if (TM->getOptLevel() != CodeGenOpt::None && EnableAtomicTidy)
- addPass(createCFGSimplificationPass());
+ addPass(createLateCFGSimplificationPass());
// Run LoopDataPrefetch
//
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38262.116616.patch
Type: text/x-patch
Size: 1311 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170925/b78ae019/attachment.bin>
More information about the llvm-commits
mailing list