[all-commits] [llvm/llvm-project] caa124: [InstCombine] Zero-extend shift amounts in narrow ...

Antonio Frighetto via All-commits all-commits at lists.llvm.org
Tue Nov 7 05:16:30 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: caa124b58d9f59b36ec751c98ca1bd1d1ceb0a73
      https://github.com/llvm/llvm-project/commit/caa124b58d9f59b36ec751c98ca1bd1d1ceb0a73
  Author: Antonio Frighetto <me at antoniofrighetto.com>
  Date:   2023-11-07 (Tue, 07 Nov 2023)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
    M llvm/test/Transforms/InstCombine/rotate.ll

  Log Message:
  -----------
  [InstCombine] Zero-extend shift amounts in narrow funnel shift ops

An issue arose when handling shift amounts while performing
narrowed funnel shifts simplification. Specifically, shift
amounts were incorrectly truncated when their type was
narrower than the target bit width. This has been addressed
by zero-extending `ShAmt` in such cases.

Fixes: https://github.com/llvm/llvm-project/issues/71463.

Proof: https://alive2.llvm.org/ce/z/5draKz.




More information about the All-commits mailing list