[all-commits] [llvm/llvm-project] dbd219: [DAGCombiner][X86] Correctly clean up high bits in...

Yingwei Zheng via All-commits all-commits at lists.llvm.org
Sat Feb 22 20:58:06 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dbd219aef4be56754c793589c60bd787b7de60c2
      https://github.com/llvm/llvm-project/commit/dbd219aef4be56754c793589c60bd787b7de60c2
  Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
  Date:   2025-02-23 (Sun, 23 Feb 2025)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/combine-i64-trunc-srl-add.ll

  Log Message:
  -----------
  [DAGCombiner][X86] Correctly clean up high bits in `combinei64TruncSrlAdd` (#128353)

A counterexample for original implementation:
https://alive2.llvm.org/ce/z/7ieYLg
This patch uses zext instead of anyext to fix the original issue.
BTW, we should keep low `64 - shamt` bits instead of `shamt - 32`:
https://alive2.llvm.org/ce/z/ruQP_Z
Some codes are simplified to avoid confusion.
Proof: https://alive2.llvm.org/ce/z/z_jdHD

Closes https://github.com/llvm/llvm-project/issues/128309.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list