1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 14:02:52 +02:00
llvm-mirror/test
Pete Cooper 20cab35e27 Loop idiom recognizer was replacing too many uses of popcount.
When spotting that a loop can use ctpop, we were incorrectly replacing all uses of a value with a value derived from ctpop.

The bug here was exposed because we were replacing a use prior to the ctpop with the ctpop value and so we have a use before def, i.e., we changed

 %tobool.5 = icmp ne i32 %num, 0
 store i1 %tobool.5, i1* %ptr
 br i1 %tobool.5, label %for.body.lr.ph, label %for.end

to

 store i1 %1, i1* %ptr
 %0 = call i32 @llvm.ctpop.i32(i32 %num)
 %1 = icmp ne i32 %0, 0
 br i1 %1, label %for.body.lr.ph, label %for.end

Even if we inserted the ctpop so that it dominates the store here, that would still be incorrect.  The store doesn’t want the result of ctpop.

The fix is very simple, and involves replacing only the branch condition with the ctpop instead of all uses.

Reviewed by Hal Finkel.

llvm-svn: 242068
2015-07-13 21:25:33 +00:00
..
Analysis Cleanup after r241809 - remove uncessary call to std::sort 2015-07-13 14:48:24 +00:00
Assembler Extended syntax of vector version of getelementptr instruction. 2015-07-09 07:42:48 +00:00
Bindings test: Move target dependent test in their own folder for c API test 2015-06-23 06:46:54 +00:00
Bitcode Add argmemonly attribute. 2015-07-11 10:30:36 +00:00
BugPoint
CodeGen [WinEH] Emit the LSDA even if no lpads remain but outlining occurred 2015-07-13 20:41:46 +00:00
DebugInfo [CodeView] Add support for emitting column information 2015-07-09 00:19:51 +00:00
ExecutionEngine [Mips] Add support for MCJIT for MIPS32r6 2015-07-06 12:50:55 +00:00
Feature Revert the new EH instructions 2015-07-10 07:15:17 +00:00
FileCheck
Instrumentation [SanitizerCoverage] Don't add instrumentation to unreachable blocks. 2015-06-30 23:11:45 +00:00
Integer
JitListener
LibDriver LibDriver: Fix output path inference. 2015-07-08 19:00:46 +00:00
Linker Linker: Do not expect comdat to exist in source module. 2015-06-22 21:46:51 +00:00
LTO Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
MC [MC] Correctly escape .safeseh's symbol 2015-07-13 18:51:15 +00:00
Object Add support deterministic output in llvm-ar and make it the default. 2015-07-13 20:38:09 +00:00
Other [llvm-extract] Drop comdats from declarations 2015-07-06 18:48:02 +00:00
SymbolRewriter
TableGen
tools [llvm-readobj] Print MIPS PLT table 2015-07-09 18:23:10 +00:00
Transforms Loop idiom recognizer was replacing too many uses of popcount. 2015-07-13 21:25:33 +00:00
Unit
Verifier Revert the new EH instructions 2015-07-10 07:15:17 +00:00
YAMLParser
.clang-format
CMakeLists.txt LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00
lit.cfg LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00
lit.site.cfg.in
Makefile
Makefile.tests
TestRunner.sh