aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectSession.cpp
diff options
context:
space:
mode:
authorYingwei Zheng <dtcxzyw2333@gmail.com>2024-10-05 09:23:29 +0800
committerGitHub <noreply@github.com>2024-10-05 09:23:29 +0800
commite6549b8036089f20c6ac01e644a544aa2b231ca8 (patch)
treec570c7ed44ebd8c7e2501829b8eb54d3d3f46b2a /lldb/source/Commands/CommandObjectSession.cpp
parentb5f6689dc93216f9272e790e787548cf29250566 (diff)
downloadllvm-e6549b8036089f20c6ac01e644a544aa2b231ca8.zip
llvm-e6549b8036089f20c6ac01e644a544aa2b231ca8.tar.gz
llvm-e6549b8036089f20c6ac01e644a544aa2b231ca8.tar.bz2
[RISCV][ISel] Allow emitting `addiw` with u32simm12 rhs (#111116)
In InstCombine, we shrink the constant by setting unused bits to zero (e.g. `((X + -2) & 4294967295) -> ((X + 4294967294) & 4294967295)`). However, this canonicalization blocks emitting `addiw` and creates redundant li for simm32 rhs: ``` ; bin/llc -mtriple=riscv64 -mattr=+zba test.ll -o - define i64 @add_u32simm32_zextw(i64 %x) nounwind { entry: %add = add i64 %x, 4294967294 %and = and i64 %add, 4294967295 ret i64 %and } ``` ``` add_u32simm32_zextw: # @add_u32simm32_zextw # %bb.0: # %entry li a1, -2 add a0, a0, a1 zext.w a0, a0 ret ``` This patch addresses the issue by matching u32simm12 rhs.
Diffstat (limited to 'lldb/source/Commands/CommandObjectSession.cpp')
0 files changed, 0 insertions, 0 deletions