aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2022-05-02 17:52:02 +0200
committerNikita Popov <npopov@redhat.com>2022-05-02 17:56:01 +0200
commit95fedfab6cfb82a2fe1010d266b1269425f5eb46 (patch)
treed729ed84f4197ba444e93023a36643e84c816455 /clang/lib/Frontend/CompilerInvocation.cpp
parentaa69cb76958c7cab9f079e3fd0d87515821b2309 (diff)
downloadllvm-95fedfab6cfb82a2fe1010d266b1269425f5eb46.zip
llvm-95fedfab6cfb82a2fe1010d266b1269425f5eb46.tar.gz
llvm-95fedfab6cfb82a2fe1010d266b1269425f5eb46.tar.bz2
[InstCombine] Handle non-canonical GEP index in indexed compare fold (PR55228)
Normally the index type will already be canonicalized here, but this is not guaranteed depending on visitation order. The code was already accounting for a potentially needed sext, but a trunc may also be needed. Add a ConstantExpr::getSExtOrTrunc() helper method to make this simpler. This matches the corresponding IRBuilder method in behavior. Fixes https://github.com/llvm/llvm-project/issues/55228.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions