[all-commits] [llvm/llvm-project] 45ae7d: [SPIRV] Fix assert in `getOrCreateBaseRegister` fo...

Justin Bogner via All-commits all-commits at lists.llvm.org
Mon Nov 4 05:24:04 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 45ae7d166ddf7265eddcfe9d0969a3408a2c7384
      https://github.com/llvm/llvm-project/commit/45ae7d166ddf7265eddcfe9d0969a3408a2c7384
  Author: Justin Bogner <mail at justinbogner.com>
  Date:   2024-11-04 (Mon, 04 Nov 2024)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp

  Log Message:
  -----------
  [SPIRV] Fix assert in `getOrCreateBaseRegister` for `i32 -1` (#114630)

When trying to create a const inst from a 32 bit signed value, we don't
want to sign-extend it to 64 bits, as the resulting value won't actually
fit in an `i32` if it was negative.

This fixes crashes in the following two tests after the APInt
constructor asserts were enabled in #114539:
```
Failed Tests (2):
  LLVM :: CodeGen/SPIRV/transcoding/RelationalOperators.ll
  LLVM :: CodeGen/SPIRV/uitofp-with-bool.ll
```



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