[PATCH] D99439: Update @llvm.powi to handle different int sizes for the exponent

Bjorn Pettersson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 26 12:45:54 PDT 2021


bjope added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/pow-4.ll:4
+; RUN: opt -instcombine -S < %s -mtriple unknown -disable-builtin sqrt  | FileCheck %s --check-prefixes=CHECK,CHECKI32,NOSQRT
+; RUN: opt -instcombine -S < %s -mtriple msp430                        | FileCheck %s --check-prefixes=CHECK,CHECKI16,SQRT
+; RUN: opt -instcombine -S < %s -mtriple msp430 -disable-builtin sqrt  | FileCheck %s --check-prefixes=CHECK,CHECKI16,NOSQRT
----------------
bjope wrote:
> Need to move these tests to a msp430 subdir.
Or maybe not. This actually works even with `LLVM_TARGETS_TO_BUILD=Sparc`, without being moved to a subdir (and the test ends up as PASSED rather than UNSUPPORTED).  So this just follow how it is done for lots of other test cases that verify libcall support in InstCombine.


================
Comment at: llvm/test/Transforms/InstCombine/pow_fp_int16.ll:1
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -mtriple unknown -instcombine -S < %s | FileCheck %s
+; RUN: opt -mtriple msp430 -instcombine -S < %s | FileCheck %s
 
----------------
bjope wrote:
> bjope wrote:
> > fhahn wrote:
> > > I don't think we can rely on any specific triple here. If a triple is needed it should be in a sub-directory.
> > Yes, right, I need to move this.
> A bit surprised that there are several tests in `test/Transform/InstCombine/` that use `-mtriple` without the test case being in a target specific subfolder. For example  `test/Transform/InstCombine/pow-1.ll` is verifying 12 different mtriple variants (plus the default). Is that OK? How could one know if a target specific dir is needed when using `-mtriple` (unless doing some experiments with different targets-to-build settings)?
This actually works even with `LLVM_TARGETS_TO_BUILD=Sparc`, without being moved to a subdir (and the test ends up as PASSED rather than UNSUPPORTED). So  so this just follow how things are done for lots of other test cases that verify libcall support in InstCombine, and moving it to a subdir with a requirement to include MSP430 in the build only limits the amount of configs when the test case is executed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99439/new/

https://reviews.llvm.org/D99439



More information about the cfe-commits mailing list