[llvm] [CodeGen] [AMDGPU] Adds pre-commit test for fmul-select combine (PR #111107)
Vikash Gupta via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 10 04:21:46 PDT 2024
vg0204 wrote:
> Test really high powers of 2. Particularly the cases where the exponent is > 64 (or < -16) and thus no longer an inline immediate
```
define float @fmul_select_f32_test11(float %x, i32 %bool.arg1, i32 %bool.arg2) {
%bool = icmp eq i32 %bool.arg1, %bool.arg2
%y = select i1 %bool, float -3.0223145e+23, float -7.2057594e+16
%ldexp = fmul float %x, %y
ret float %ldexp
}
```
Note : **_-3.0223145e+23 = -2^78_** and _**-7.2057594e+16 = -2^56**_
Whats wrong with this as it is giving this error?
```
/opt/compiler-explorer/clang-trunk/bin/llc: error: /opt/compiler-explorer/clang-trunk/bin/llc: <source>:72:31: error: floating point constant invalid for type
%y = select i1 %bool, float -3.0223145e+23, float -7.2057594e+16
^
Compiler returned: 1
```
https://github.com/llvm/llvm-project/pull/111107
More information about the llvm-commits
mailing list