Juan Manuel Martinez =?utf-8?q?Caamaño?= <juama...@amd.com>,
Juan Manuel Martinez =?utf-8?q?Caamaño?= <juama...@amd.com>,
Juan Manuel Martinez =?utf-8?q?Caamaño?= <juama...@amd.com>,
Juan Manuel Martinez =?utf-8?q?Caamaño?= <juama...@amd.com>,
Juan Manuel Martinez =?utf-8?q?Caamaño?= <juama...@amd.com>,
Juan Manuel Martinez =?utf-8?q?Caamaño?= <juama...@amd.com>,
Juan Manuel Martinez =?utf-8?q?Caamaño?= <juama...@amd.com>,
Juan Manuel Martinez =?utf-8?q?Caamaño?= <juama...@amd.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/133...@github.com>


================
@@ -743,9 +743,13 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, 
IntrinsicInst &II) const {
     if (!CArg)
       break;
 
-    int CArg4BitAsInt = CArg->getValue().trunc(4).getSExtValue();
-    float ResVal = 0.0625 * CArg4BitAsInt;
-    Constant *Res = ConstantFP::get(II.getType(), ResVal);
+    // Tabulated 0.0625 * (sext (CArg & 0xf)).
+    constexpr size_t ResValsSize = 16;
+    const float ResVals[ResValsSize] = {
----------------
shiltian wrote:

or even `constexpr`?

https://github.com/llvm/llvm-project/pull/133741
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to