Revert "[ValueTracking][InstCombine] Add a new API to allow to ignore poison...
Revert "[ValueTracking][InstCombine] Add a new API to allow to ignore poison generating flags or metadatas when implying poison" This reverts commit 754f3ae6. Unfortunately the change can cause regressions due to dropping flags from instructions (like nuw,nsw,inbounds), prevent further optimizations depending on those flags. A simple example is the IR below, where `inbounds` is dropped with the patch and the phase-ordering test added in 7c91d82a. define i1 @test(ptr %base, i64 noundef %len, ptr %p2) { bb: %gep = getelementptr inbounds i32, ptr %base, i64 %len %c.1 = icmp uge ptr %p2, %base %c.2 = icmp ult ptr %p2, %gep %select = select i1 %c.1, i1 %c.2, i1 false ret i1 %select } For more discussion, see D149404.
Loading
Please sign in to comment