[all-commits] [llvm/llvm-project] 1674d9: [PowerPC] Fix vector equality comparison for v2i64...

Nemanja Ivanovic via All-commits all-commits at lists.llvm.org
Tue Dec 21 12:29:29 PST 2021

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1674d9b6b2da914619c7c197336bb74f7988cf38
  Author: Nemanja Ivanovic <nemanja.i.ibm at gmail.com>
  Date:   2021-12-21 (Tue, 21 Dec 2021)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCISelLowering.cpp
    A llvm/test/CodeGen/PowerPC/vec-icmpeq-v2i64-p7.ll

  Log Message:
  [PowerPC] Fix vector equality comparison for v2i64 pre-Power8

The current code makes the assumption that equality
comparison can be performed with a word comparison
instruction. While this is true if the entire 64-bit
results are used, it does not generally work. It is
possible that the low order words and high order
words produce different results and a user of only
one will get the wrong result.

This patch adds an and of the result words so that
each word has the result of the comparison of the
entire doubleword that contains it.

Differential revision: https://reviews.llvm.org/D115678

More information about the All-commits mailing list