Files
clang-p2996/llvm/test/Transforms/InstSimplify/fcmp.ll
Juneyoung Lee 5af8bacc94 [InstSimplify] Add more poison folding optimizations
This adds more poison folding optimizations to InstSimplify.

Since all binary operators propagate poison, these are fine.

Also, the precondition of `select cond, undef, x` -> `x` is relaxed to allow the case when `x` is undef.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D104661
2021-06-23 20:25:24 +09:00

19 lines
394 B
LLVM

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -instsimplify -S | FileCheck %s
define i1 @poison(float %x) {
; CHECK-LABEL: @poison(
; CHECK-NEXT: ret i1 poison
;
%v = fcmp oeq float %x, poison
ret i1 %v
}
define i1 @poison2(float %x) {
; CHECK-LABEL: @poison2(
; CHECK-NEXT: ret i1 poison
;
%v = fcmp ueq float %x, poison
ret i1 %v
}