[InstrProf] Use i32 for GEP index from lowering llvm.instrprof.increment
authorEllis Hoag <ellis.sparky.hoag@gmail.com>
Fri, 19 Nov 2021 23:44:48 +0000 (15:44 -0800)
committerKyungwoo Lee <kyulee@fb.com>
Fri, 19 Nov 2021 23:45:14 +0000 (15:45 -0800)
commitde11de308b6480fc35d901c7104f46918674418c
tree0e9d38c9e20f005d2ad54bc7c5974ee24d5e1ba6
parenta6f53afbcb4d995139064276b5ad971ad7ced5e2
[InstrProf] Use i32 for GEP index from lowering llvm.instrprof.increment

The `llvm.instrprof.increment` intrinsic uses `i32` for the index. We should use this same type for the index into the GEP instructions.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D114268
17 files changed:
clang/test/CodeGen/profile-filter.c
clang/test/Profile/branch-logical-mixed.cpp
clang/test/Profile/c-captured.c
clang/test/Profile/c-general.c
clang/test/Profile/c-ternary.c
clang/test/Profile/cxx-class.cpp
clang/test/Profile/cxx-lambda.cpp
clang/test/Profile/cxx-rangefor.cpp
clang/test/Profile/cxx-stmt-initializers.cpp
clang/test/Profile/cxx-templates.cpp
clang/test/Profile/cxx-throws.cpp
clang/test/Profile/objc-general.m
llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
llvm/test/Instrumentation/InstrProfiling/atomic-updates.ll
llvm/test/Instrumentation/InstrProfiling/runtime-counter-relocation.ll
llvm/test/Transforms/PGOProfile/counter_promo_exit_catchswitch.ll
llvm/test/Transforms/PGOProfile/instr_entry_bb.ll