[PATCH] Added TargetLowering::isVectorEltOrderLittleEndian(EVT)

Daniel Sanders daniel.sanders at imgtec.com
Wed Nov 6 05:51:39 PST 2013


  I have confirmed that the tests are only passing because it is calling the wrong implementation of isVectorEltOrderLittleEndian(). Adding the 'virtual' keyword causes it to call the correct implementation and as a result the tests fail.

  It turns out that I've made a fairly silly mistake in the patch that uses this hook (D1973). When trying to reverse the element order in the legalized BUILD_VECTOR, I've actually written code to reverse the endianness of each element within the vector. Furthermore, no code is required to reverse the element order because getConstant() returns a splatted vector. As a result, the hook added by this patch is no longer required.

  My plan for fixing this is to:
  * Abandon this patch (D1971) since the hook it adds is no longer required.
  * Update D1972 with a small change to basic_operations.ll to remove the dependency on the multiple check prefixes feature of FileCheck (D1374).
  * Update D1973  with the if-statement in getConstant() using isVectorEltOrderLittleEndian() replaced by a comment explaining that element reversal is necessary but does not require code since it's producing a splat.

  I should be able to upload the updated patches today.

  @qcolombet: Thanks again for spotting the missing virtual keyword.

http://llvm-reviews.chandlerc.com/D1971



More information about the llvm-commits mailing list