Skip to content
Commit fbec8f04 authored by Yaxun (Sam) Liu's avatar Yaxun (Sam) Liu
Browse files

[SimplifyCFG] Do not hoist/sink convergent function calls

Currently SimplifyCFG hoists/sink common instructions in then/else basic blocks
when certain options are enabled, which is the case for default clang optimization
pipelines for -O3. It tries to hoist/sink convergent function calls in divergent
control flow, which causes incorrect ISA generated for GPU, e.g.
https://github.com/ROCm-Developer-Tools/HIP/issues/3172

This patch fixes that by conservatively disable hoisting/sinking common
convergent function calls in then/else blocks.

Reviewed by: Artem Belevich

Differential Revision: https://reviews.llvm.org/D144756
parent 83c0d652
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment