[all-commits] [llvm/llvm-project] 5fd9bb: [DAGCombiner] Pre-commit test case for miscompile ...

Björn Pettersson via All-commits all-commits at lists.llvm.org
Tue Apr 23 05:01:30 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5fd9bbdea6cc248469d5465de44e747378ffafcb
      https://github.com/llvm/llvm-project/commit/5fd9bbdea6cc248469d5465de44e747378ffafcb
  Author: Bjorn Pettersson <bjorn.a.pettersson at ericsson.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M llvm/test/CodeGen/X86/shift-combine.ll

  Log Message:
  -----------
  [DAGCombiner] Pre-commit test case for miscompile bug in combineShiftOfShiftedLogic

DAGCombiner is trying to fold shl over binops, and in the process
combining it with another shl. However it needs to be more careful
to ensure that the sum of the shift counts fits in the type used
for the shift amount.
For example, X86 is using i8 as shift amount type. So we need to
make sure that the sum of the shift amounts isn't greater than 255.

Fix will be applied in a later commit. This only pre-commits the
test case to show that we currently get the wrong result.

Bug was found when testing the C23 BitInt feature.



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