diff options
author | Sanjay Patel <spatel@rotateright.com> | 2020-07-24 15:11:02 -0400 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2020-07-26 09:04:37 -0400 |
commit | b89ae102e6f5ed3760f1ae5788bd76ef8e9d9490 (patch) | |
tree | 6f77487edae919a39db0e7a2c594810a1435a1a8 /llvm/lib/CodeGen/LocalStackSlotAllocation.cpp | |
parent | 912e9e526233c54aa08b082c957499fa9124eece (diff) | |
download | llvm-b89ae102e6f5ed3760f1ae5788bd76ef8e9d9490.zip llvm-b89ae102e6f5ed3760f1ae5788bd76ef8e9d9490.tar.gz llvm-b89ae102e6f5ed3760f1ae5788bd76ef8e9d9490.tar.bz2 |
[InstSimplify] fold fcmp using isKnownNeverInfinity + isKnownNeverNaN
Follow-up to D84035 / rG7393d7574c09.
This sidesteps a question of FMF/poison on fcmp raised in PR46077:
http://bugs.llvm.org/PR46077
https://alive2.llvm.org/ce/z/TCsyzD
define i1 @src(float %x) {
%0:
%x42 = fadd nnan ninf float %x, 42.000000
%r = fcmp ueq float %x42, inf
ret i1 %r
}
=>
define i1 @tgt(float %x) {
%0:
ret i1 0
}
Transformation seems to be correct!
https://alive2.llvm.org/ce/z/FQaH7a
define i1 @src(i8 %x) {
%0:
%cast = uitofp i8 %x to float
%r = fcmp one float inf, %cast
ret i1 %r
}
=>
define i1 @tgt(i8 %x) {
%0:
ret i1 1
}
Transformation seems to be correct!
Diffstat (limited to 'llvm/lib/CodeGen/LocalStackSlotAllocation.cpp')
0 files changed, 0 insertions, 0 deletions