This patch removes an old hack in visitSelectInst that was written to avoid miscompilation bugs in loop unswitch. (Added via https://reviews.llvm.org/D35811) The legacy loop unswitch pass will be removed after D124376, and the new simple loop unswitch pass correctly uses freeze to avoid introducing UB after D124252. Since the hack is not necessary anymore, this patch removes it. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D124426
13 lines
369 B
LLVM
13 lines
369 B
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
|
; RUN: opt < %s -passes=instcombine -S | FileCheck %s
|
|
|
|
define i1 @f(i1 %cond, i32 %x, i32 %x2) {
|
|
; CHECK-LABEL: @f(
|
|
; CHECK-NEXT: [[C:%.*]] = icmp eq i32 [[X:%.*]], [[X2:%.*]]
|
|
; CHECK-NEXT: ret i1 [[C]]
|
|
;
|
|
%y = select i1 %cond, i32 poison, i32 %x
|
|
%c = icmp eq i32 %y, %x2
|
|
ret i1 %c
|
|
}
|