[PATCH] D134954: [InstCombine] Switch foldOpIntoPhi() to use InstSimplify
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 5 04:08:42 PDT 2022
nikic added a comment.
Reduced the infinite loop on buildbots to this test case:
define i64 @test(i1 %c, ptr %arg.ptr, ptr %arg.ptr2) {
entry:
br i1 %c, label %if, label %else
if:
%arg.ptr2.val = load i64, ptr %arg.ptr2, align 8
br label %join
else:
%arg.int.ptr = ptrtoint ptr %arg.ptr to i64
br label %join
join:
%int.ptr = phi i64 [ %arg.ptr2.val, %if ], [ %arg.int.ptr, %else ]
%ptr = inttoptr i64 %int.ptr to ptr
%v = load i64, ptr %ptr, align 8
ret i64 %v
}
The conflicting transform appears to be this: https://github.com/llvm/llvm-project/blob/78305720f387ba5c86810a02155bd6c58d22c97c/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp#L105
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134954/new/
https://reviews.llvm.org/D134954
More information about the llvm-commits
mailing list