[PATCH] D90070: [TTI] Add optional VecPred argument to getCmpSelInstrCost.

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 30 14:18:18 PDT 2020


vitalybuka added inline comments.


================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfoImpl.h:958
       return TargetTTI->getCmpSelInstrCost(Opcode, ValTy, U->getType(),
+                                           cast<CmpInst>(U)->getPredicate(),
                                            CostKind, I);
----------------
pcc wrote:
> This fails an assertion if the instruction is a constant. If you have a copy of the Android NDK you should be able to reproduce using the in-tree HWASan runtime with something like:
> ```
> /path/to/build-directory/bin/clang++ -o hwasan_dynamic_shadow.o -c compiler-rt/lib/hwasan/hwasan_dynamic_shadow.cpp -DHWASAN_WITH_INTERCEPTORS=1 -Icompiler-rt/lib --target=aarch64-linux-android29 --sysroot=/path/to/android-ndk-r21/toolchains/llvm/prebuilt/linux-x86_64/sysroot -B/path/to/android-ndk-r21/toolchains/llvm/prebuilt/linux-x86_64 -O3 -fdiagnostics-color -Wall -Wextra -Wno-unused-parameter -Wdelete-non-virtual-dtor -Wstring-conversion -no-canonical-prefixes -Werror=date-time -Wcovered-switch-default -fPIC -funwind-tables -gline-tables-only -fvisibility=hidden -std=c++14 -fvisibility-inlines-hidden -fno-exceptions -fno-rtti
> ```
> But let me know if you need a repro.
same crash on linux bot without android http://lab.llvm.org:8011/#/builders/85/builds/383


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90070



More information about the llvm-commits mailing list