[PATCH] D151887: InstSimplify: Start cleaning up simplifyFCmpInst
Zequan Wu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 1 10:57:13 PDT 2023
zequanwu added a comment.
Attach reduced IR:
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
; Function Attrs: null_pointer_is_valid
define i1 @_ZNK3gfx10ColorSpace25IsTransferFunctionEqualToERK22skcms_TransferFunction(ptr %this, float %0) #0 {
entry:
store float 0xFFFFFFFFE0000000, ptr %this, align 4
%call = call i1 @_ZNK3gfx10ColorSpace19GetTransferFunctionEP22skcms_TransferFunctionN4absl8optionalIfEE()
%1 = load float, ptr %this, align 4
%cmp = fcmp oeq float %1, %0
br i1 %cmp, label %land.lhs.true, label %land.end
land.lhs.true: ; preds = %entry
%2 = load float, ptr null, align 4294967296
%tobool = fcmp une float %2, 0.000000e+00
br i1 %tobool, label %land.rhs, label %land.end
land.rhs: ; preds = %land.lhs.true
br label %land.end
land.end: ; preds = %land.rhs, %land.lhs.true, %entry
%3 = phi i1 [ false, %land.lhs.true ], [ false, %entry ], [ true, %land.rhs ]
ret i1 %3
}
; Function Attrs: null_pointer_is_valid
define i1 @_ZNK3gfx10ColorSpace19GetTransferFunctionEP22skcms_TransferFunctionN4absl8optionalIfEE() #0 {
entry:
%0 = load i8, ptr null, align 4294967296
switch i8 %0, label %sw.default [
i8 0, label %common.ret
i8 1, label %common.ret
]
common.ret: ; preds = %sw.default, %entry, %entry
ret i1 false
sw.default: ; preds = %entry
%call6 = call i1 null(i8 0, ptr null)
br label %common.ret
}
attributes #0 = { null_pointer_is_valid }
This command triggers the error even with the fix (0637b00041c7d6a191d51d9966c4f5f41fb97ab5 <https://reviews.llvm.org/rG0637b00041c7d6a191d51d9966c4f5f41fb97ab5>):
opt '-passes=default<O2>' reduce.ll
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151887/new/
https://reviews.llvm.org/D151887
More information about the llvm-commits
mailing list