mirror of
https://github.com/EmbarkStudios/rust-gpu.git
synced 2025-02-20 10:56:12 +00:00
Fix up new intrinsic introduced by rustup update
This commit is contained in:
parent
5f9ca11eb9
commit
82039169ab
@ -4,6 +4,7 @@ use crate::abi::SpirvType;
|
||||
use crate::builder_spirv::{BuilderCursor, SpirvValue, SpirvValueExt};
|
||||
use crate::codegen_cx::CodegenCx;
|
||||
use rustc_ast::ast::{InlineAsmOptions, InlineAsmTemplatePiece};
|
||||
use rustc_codegen_ssa::common::IntPredicate;
|
||||
use rustc_codegen_ssa::mir::operand::{OperandRef, OperandValue};
|
||||
use rustc_codegen_ssa::mir::place::PlaceRef;
|
||||
use rustc_codegen_ssa::traits::{
|
||||
@ -301,6 +302,16 @@ impl<'a, 'spv, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'spv, 'tcx> {
|
||||
self.gep(ptr, &[offset])
|
||||
}
|
||||
|
||||
sym::ptr_guaranteed_eq | sym::ptr_guaranteed_ne => {
|
||||
let a = args[0].immediate();
|
||||
let b = args[1].immediate();
|
||||
if name == sym::ptr_guaranteed_eq {
|
||||
self.icmp(IntPredicate::IntEQ, a, b)
|
||||
} else {
|
||||
self.icmp(IntPredicate::IntNE, a, b)
|
||||
}
|
||||
}
|
||||
|
||||
_ => panic!("TODO: Unknown intrinsic '{}'", name),
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user