Skip to content

Commit 928c98f

Browse files
committed
Port old change to latest main
1 parent 11553f2 commit 928c98f

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

crates/rustc_codegen_spirv/src/codegen_cx/constant.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ impl<'tcx> CodegenCx<'tcx> {
1818
self.builder.def_constant_cx(ty, val, self)
1919
}
2020

21-
pub fn constant_i8(&self, span: Span, val: i8) -> SpirvValue {
22-
let ty = SpirvType::Integer(8, true).def(span, self);
23-
self.def_constant(ty, SpirvConst::U32(val as u32))
24-
}
25-
2621
pub fn constant_u8(&self, span: Span, val: u8) -> SpirvValue {
2722
self.constant_int_from_native_unsigned(span, val)
2823
}
@@ -48,8 +43,7 @@ impl<'tcx> CodegenCx<'tcx> {
4843
}
4944

5045
pub fn constant_i64(&self, span: Span, val: u64) -> SpirvValue {
51-
let ty = SpirvType::Integer(64, true).def(span, self);
52-
self.def_constant(ty, SpirvConst::U64(val))
46+
self.constant_int_from_native_signed(span, val)
5347
}
5448

5549
pub fn constant_u64(&self, span: Span, val: u64) -> SpirvValue {

0 commit comments

Comments
 (0)