It is possible that the HostPtr that coresponds to an array could be
invariant load hoisted. Make sure we use the invariant load hoisted
value by using IslNodeBuilder::getLatestValue.
Details
Details
- Reviewers
efriedma jdoerfert Meinersbur gareevroman sebpop • zinob huihuiz pollydev grosser singam-sanjay - Commits
- rGedf9581e4c11: [PPCGCodeGeneration] Correct usage of llvm::Value with getLatestValue.
rPLO309681: [PPCGCodeGeneration] Correct usage of llvm::Value with getLatestValue.
rL309681: [PPCGCodeGeneration] Correct usage of llvm::Value with getLatestValue.
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Crafting a testcase for this is hard, I'm actually unable to reduce this. @grosser, @Meinersbur - Any ideas on what to do?
Comment Actions
The test case looks good, but it seems you merged in your earlier commit. Assuming these will be committed separately, this LGTM.
Comment Actions
@singam-sanjay : During invariant load hoisting, we setup "replacement" values for old values. However, we don't pickup the "replacement" values in all places we should be doing so. This patch caught one such instance and fixed it. I believe there are possibly more occurrences of this bug that I've missed :)
Comment Actions
@singam-sanjay Specifically, the getLatestValue returns either the replacement value if it exists, or the original if there is no replacement.