ispc icon indicating copy to clipboard operation
ispc copied to clipboard

Limit canonicalization and add lit test

Open azwolski opened this issue 1 month ago • 0 comments

Description

Add an LLVM patch to restrict the canonicalization of extractelement(cast) to cases where the index is constant or both instructions are in the same basic block. Add also a lit test to expose the issue.

There is also a opensource LLVM PR under the review: https://github.com/llvm/llvm-project/pull/166227

Related Issue

This is fix for Sub-par code generation when using extract issue

Checklist

  • [x] Code has been formatted with clang-format (e.g., clang-format -i src/ispc.cpp)
  • [x] Git history has been squashed to meaningful commits (one commit per logical change)
  • [x] Compiler changes are covered by lit tests
  • [ ] Language/stdlib changes include new functional tests for runtime behavior
  • [ ] Documentation updated if needed

azwolski avatar Nov 16 '25 22:11 azwolski