diff options
| author | Flakebi <flakebi@t-online.de> | 2025-01-02 13:10:51 +0100 |
|---|---|---|
| committer | Flakebi <flakebi@t-online.de> | 2025-01-02 15:45:04 +0100 |
| commit | 56bf673f0a1698a4ebcd2d29bfbcc2c0220148ac (patch) | |
| tree | 04518a397a85c8b35d02122b81da9b0e1c149533 /compiler/rustc_codegen_llvm/src | |
| parent | bf6f8a4d328f7f3b0f6ea8205ad28591cc11aafd (diff) | |
| download | rust-56bf673f0a1698a4ebcd2d29bfbcc2c0220148ac.tar.gz rust-56bf673f0a1698a4ebcd2d29bfbcc2c0220148ac.zip | |
Remove range-metadata amdgpu workaround
Range metadata was disabled for amdgpu due to a backend bug. I did not encounter any problems when removing the workaround to enable range metadata (tried compiling `core` and `alloc`), so I assume this has been fixed in LLVM in the last years. Remove the workaround to re-enable range metadata.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/builder.rs | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/compiler/rustc_codegen_llvm/src/builder.rs b/compiler/rustc_codegen_llvm/src/builder.rs index ab0e43e60a4..5a34b52e6ef 100644 --- a/compiler/rustc_codegen_llvm/src/builder.rs +++ b/compiler/rustc_codegen_llvm/src/builder.rs @@ -610,14 +610,6 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> { } fn range_metadata(&mut self, load: &'ll Value, range: WrappingRange) { - if self.sess().target.arch == "amdgpu" { - // amdgpu/LLVM does something weird and thinks an i64 value is - // split into a v2i32, halving the bitwidth LLVM expects, - // tripping an assertion. So, for now, just disable this - // optimization. - return; - } - if self.cx.sess().opts.optimize == OptLevel::No { // Don't emit metadata we're not going to use return; |
