summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM
diff options
context:
space:
mode:
authorJames Molloy <james.molloy@arm.com>2016-08-19 10:10:27 +0000
committerJames Molloy <james.molloy@arm.com>2016-08-19 10:10:27 +0000
commit11a1936b70be22a9b99fc661fd46a837507df65c (patch)
tree52afef2985da74169b00eb77ea30136fb551eb6e /llvm/test/CodeGen/ARM
parent5dbc90a8f184ae4abd8a9ef55c5be7cf884bd837 (diff)
downloadbcm5719-llvm-11a1936b70be22a9b99fc661fd46a837507df65c.tar.gz
bcm5719-llvm-11a1936b70be22a9b99fc661fd46a837507df65c.zip
[SimplifyCFG] Rewrite SinkThenElseCodeToEnd
The new version has several advantages: 1) IMSHO it's more readable and neater 2) It handles loads and stores properly 3) It can handle any number of incoming blocks rather than just two. I'll be taking advantage of this in a followup patch. With this change we can now finally sink load-modify-store idioms such as: if (a) return *b += 3; else return *b += 4; => %z = load i32, i32* %y %.sink = select i1 %a, i32 5, i32 7 %b = add i32 %z, %.sink store i32 %b, i32* %y ret i32 %b When this works for switches it'll be even more powerful. llvm-svn: 279229
Diffstat (limited to 'llvm/test/CodeGen/ARM')
-rw-r--r--llvm/test/CodeGen/ARM/avoid-cpsr-rmw.ll2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/ARM/avoid-cpsr-rmw.ll b/llvm/test/CodeGen/ARM/avoid-cpsr-rmw.ll
index 79e8e68e2f5..78d3ebf371a 100644
--- a/llvm/test/CodeGen/ARM/avoid-cpsr-rmw.ll
+++ b/llvm/test/CodeGen/ARM/avoid-cpsr-rmw.ll
@@ -106,7 +106,7 @@ if.then:
if.else:
store i32 3, i32* %p, align 4
- %incdec.ptr5 = getelementptr inbounds i32, i32* %p, i32 2
+ %incdec.ptr5 = getelementptr inbounds i32, i32* %p, i32 3
store i32 5, i32* %incdec.ptr1, align 4
store i32 6, i32* %incdec.ptr5, align 4
br label %if.end
OpenPOWER on IntegriCloud