[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
Fri May 21 06:36:56 PDT 2021


bjope updated this revision to Diff 347015.
bjope added a comment.

Addressed review comments (and rebased). This includes:

- Add diagnostics for wrong sized exponent when lowering FPOWI to libcall.
- For the above to work this patch now depends on D102918 <https://reviews.llvm.org/D102918> to avoid that RISCV (64-bit) is promoting the exponent in FPOWI in a way that makes the operation undef.
- Patch now also depends on pre-commit of a test case in D102919 <https://reviews.llvm.org/D102919>.
- Updated the langref part about llvm.powi.
- Updated the ISelOpcodes description about undefined exponent types in FPOWI.
- Added auto-upgrade tests for llvm.powi.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99439

Files:
  clang/lib/CodeGen/CGBuiltin.cpp
  clang/test/CodeGen/avr-builtins.c
  clang/test/CodeGen/math-builtins.c
  clang/test/CodeGen/msp430-builtins.c
  llvm/docs/LangRef.rst
  llvm/include/llvm/Analysis/VectorUtils.h
  llvm/include/llvm/CodeGen/ISDOpcodes.h
  llvm/include/llvm/IR/Intrinsics.td
  llvm/lib/Analysis/VectorUtils.cpp
  llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
  llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
  llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
  llvm/lib/Target/Mips/Mips16HardFloat.cpp
  llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
  llvm/lib/Transforms/Scalar/Scalarizer.cpp
  llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
  llvm/test/Analysis/CostModel/AArch64/sve-intrinsics.ll
  llvm/test/Bitcode/upgrade-powi-intrinsics.ll
  llvm/test/Bitcode/upgrade-powi-intrinsics.ll.bc
  llvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
  llvm/test/CodeGen/AArch64/arm64-vfloatintrinsics.ll
  llvm/test/CodeGen/AArch64/f16-instructions.ll
  llvm/test/CodeGen/AArch64/illegal-float-ops.ll
  llvm/test/CodeGen/AArch64/powi-windows.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.powi.ll
  llvm/test/CodeGen/AMDGPU/llvm.powi.ll
  llvm/test/CodeGen/ARM/2011-11-29-128bitArithmetics.ll
  llvm/test/CodeGen/ARM/Windows/powi.ll
  llvm/test/CodeGen/ARM/fp16-fullfp16.ll
  llvm/test/CodeGen/ARM/fp16-promote.ll
  llvm/test/CodeGen/ARM/fpowi.ll
  llvm/test/CodeGen/ARM/vfloatintrinsics.ll
  llvm/test/CodeGen/Generic/fpowi-promote.ll
  llvm/test/CodeGen/Generic/replace-intrinsics-with-veclib.ll
  llvm/test/CodeGen/Mips/mips64-f128.ll
  llvm/test/CodeGen/Mips/msa/f16-llvm-ir.ll
  llvm/test/CodeGen/Mips/powif64_16.ll
  llvm/test/CodeGen/Mips/pr36061.ll
  llvm/test/CodeGen/NVPTX/f16-instructions.ll
  llvm/test/CodeGen/NVPTX/f16x2-instructions.ll
  llvm/test/CodeGen/NVPTX/libcall-intrinsic.ll
  llvm/test/CodeGen/PowerPC/f128-arith.ll
  llvm/test/CodeGen/RISCV/double-intrinsics.ll
  llvm/test/CodeGen/RISCV/float-intrinsics.ll
  llvm/test/CodeGen/RISCV/rv64i-single-softfloat.ll
  llvm/test/CodeGen/SystemZ/fp-libcall.ll
  llvm/test/CodeGen/Thumb2/float-intrinsics-double.ll
  llvm/test/CodeGen/Thumb2/float-intrinsics-float.ll
  llvm/test/CodeGen/Thumb2/intrinsics-cc.ll
  llvm/test/CodeGen/WebAssembly/libcalls.ll
  llvm/test/CodeGen/WebAssembly/simd-unsupported.ll
  llvm/test/CodeGen/X86/2007-09-27-LDIntrinsics.ll
  llvm/test/CodeGen/X86/2010-05-07-ldconvert.ll
  llvm/test/CodeGen/X86/powi-windows.ll
  llvm/test/CodeGen/X86/powi.ll
  llvm/test/CodeGen/X86/tailcall-multiret.ll
  llvm/test/CodeGen/X86/vector-intrinsics.ll
  llvm/test/CodeGen/XCore/float-intrinsics.ll
  llvm/test/Transforms/InstCombine/fdiv.ll
  llvm/test/Transforms/InstCombine/intrinsics.ll
  llvm/test/Transforms/InstCombine/pow-4.ll
  llvm/test/Transforms/InstCombine/pow_fp_int.ll
  llvm/test/Transforms/InstCombine/pow_fp_int16.ll
  llvm/test/Transforms/InstSimplify/ConstProp/math-2.ll
  llvm/test/Transforms/InstSimplify/call.ll
  llvm/test/Transforms/InstSimplify/floating-point-compare.ll
  llvm/test/Transforms/InstSimplify/fold-intrinsics.ll
  llvm/test/Transforms/LICM/hoist-round.ll
  llvm/test/Transforms/LoopVectorize/intrinsic.ll
  llvm/test/Transforms/SLPVectorizer/X86/extract_in_tree_user.ll
  llvm/test/Transforms/SLPVectorizer/X86/intrinsic.ll
  llvm/test/Transforms/Scalarizer/intrinsics.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99439.347015.patch
Type: text/x-patch
Size: 115725 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210521/b22d16cb/attachment-0001.bin>


More information about the cfe-commits mailing list