Home
last modified time | relevance | path

Searched refs:constant (Results 1 – 25 of 58) sorted by relevance

123

/art/test/952-invoke-custom/util-src/transformer/
DIndyTransformer.java129 private Object decodeConstant(int index, Constant constant) { in visitMethod() argument
130 if (constant.booleanValue().length == 1) { in visitMethod()
131 return constant.booleanValue()[0]; in visitMethod()
132 } else if (constant.byteValue().length == 1) { in visitMethod()
133 return constant.byteValue()[0]; in visitMethod()
134 } else if (constant.charValue().length == 1) { in visitMethod()
135 return constant.charValue()[0]; in visitMethod()
136 } else if (constant.shortValue().length == 1) { in visitMethod()
137 return constant.shortValue()[0]; in visitMethod()
138 } else if (constant.intValue().length == 1) { in visitMethod()
[all …]
/art/compiler/optimizing/
Dlocations.cc65 HConstant* constant = instruction->AsConstant(); in RegisterOrInt32Constant() local
66 if (constant != nullptr) { in RegisterOrInt32Constant()
67 int64_t value = CodeGenerator::GetInt64ValueOf(constant); in RegisterOrInt32Constant()
69 return Location::ConstantLocation(constant); in RegisterOrInt32Constant()
76 HConstant* constant = instruction->AsConstant(); in FpuRegisterOrInt32Constant() local
77 if (constant != nullptr) { in FpuRegisterOrInt32Constant()
78 int64_t value = CodeGenerator::GetInt64ValueOf(constant); in FpuRegisterOrInt32Constant()
80 return Location::ConstantLocation(constant); in FpuRegisterOrInt32Constant()
Dcommon_arm64.h241 inline bool Arm64CanEncodeConstantAsImmediate(HConstant* constant, HInstruction* instr) { in Arm64CanEncodeConstantAsImmediate() argument
242 int64_t value = CodeGenerator::GetInt64ValueOf(constant); in Arm64CanEncodeConstantAsImmediate()
246 if (constant->IsLongConstant()) { in Arm64CanEncodeConstantAsImmediate()
248 } else if (constant->IsFloatConstant()) { in Arm64CanEncodeConstantAsImmediate()
249 return vixl::aarch64::Assembler::IsImmFP32(constant->AsFloatConstant()->GetValue()); in Arm64CanEncodeConstantAsImmediate()
250 } else if (constant->IsDoubleConstant()) { in Arm64CanEncodeConstantAsImmediate()
251 return vixl::aarch64::Assembler::IsImmFP64(constant->AsDoubleConstant()->GetValue()); in Arm64CanEncodeConstantAsImmediate()
260 if (constant->GetUses().HasExactlyOneElement()) { in Arm64CanEncodeConstantAsImmediate()
267 return constant->IsZeroBitPattern() || constant->IsOne() || constant->IsMinusOne(); in Arm64CanEncodeConstantAsImmediate()
272 if (constant->GetUses().HasExactlyOneElement()) { in Arm64CanEncodeConstantAsImmediate()
[all …]
Dcode_generator.h519 static int8_t GetInt8ValueOf(HConstant* constant) { in GetInt8ValueOf() argument
520 DCHECK(constant->IsIntConstant()); in GetInt8ValueOf()
521 return constant->AsIntConstant()->GetValue(); in GetInt8ValueOf()
524 static int16_t GetInt16ValueOf(HConstant* constant) { in GetInt16ValueOf() argument
525 DCHECK(constant->IsIntConstant()); in GetInt16ValueOf()
526 return constant->AsIntConstant()->GetValue(); in GetInt16ValueOf()
529 static int32_t GetInt32ValueOf(HConstant* constant) { in GetInt32ValueOf() argument
530 if (constant->IsIntConstant()) { in GetInt32ValueOf()
531 return constant->AsIntConstant()->GetValue(); in GetInt32ValueOf()
532 } else if (constant->IsNullConstant()) { in GetInt32ValueOf()
[all …]
Dconstant_folding.cc94 HConstant* constant = inst->TryStaticEvaluation(); in VisitUnaryOperation() local
95 if (constant != nullptr) { in VisitUnaryOperation()
96 inst->ReplaceWith(constant); in VisitUnaryOperation()
104 HConstant* constant = inst->TryStaticEvaluation(); in VisitBinaryOperation() local
105 if (constant != nullptr) { in VisitBinaryOperation()
106 inst->ReplaceWith(constant); in VisitBinaryOperation()
117 HConstant* constant = inst->TryStaticEvaluation(); in VisitTypeConversion() local
118 if (constant != nullptr) { in VisitTypeConversion()
119 inst->ReplaceWith(constant); in VisitTypeConversion()
Dssa_builder.cc607 HFloatConstant* SsaBuilder::GetFloatEquivalent(HIntConstant* constant) { in GetFloatEquivalent() argument
609 HFloatConstant* result = constant->GetNext()->AsFloatConstant(); in GetFloatEquivalent()
611 float value = bit_cast<float, int32_t>(constant->GetValue()); in GetFloatEquivalent()
613 constant->GetBlock()->InsertInstructionBefore(result, constant->GetNext()); in GetFloatEquivalent()
618 DCHECK_EQ((bit_cast<int32_t, float>(result->GetValue())), constant->GetValue()); in GetFloatEquivalent()
629 HDoubleConstant* SsaBuilder::GetDoubleEquivalent(HLongConstant* constant) { in GetDoubleEquivalent() argument
631 HDoubleConstant* result = constant->GetNext()->AsDoubleConstant(); in GetDoubleEquivalent()
633 double value = bit_cast<double, int64_t>(constant->GetValue()); in GetDoubleEquivalent()
635 constant->GetBlock()->InsertInstructionBefore(result, constant->GetNext()); in GetDoubleEquivalent()
640 DCHECK_EQ((bit_cast<int64_t, double>(result->GetValue())), constant->GetValue()); in GetDoubleEquivalent()
Dssa_test.cc57 void VisitIntConstant(HIntConstant* constant) override { in VisitIntConstant() argument
58 PrintPreInstruction(constant); in VisitIntConstant()
59 str_ += constant->DebugName(); in VisitIntConstant()
61 PrintInt(constant->GetValue()); in VisitIntConstant()
62 PrintPostInstruction(constant); in VisitIntConstant()
/art/test/957-methodhandle-transforms/src/
DMain.java553 MethodHandle constant = MethodHandles.constant(int.class, 56); in testConstant() local
554 int value = (int) constant.invoke(); in testConstant()
560 constant = MethodHandles.constant(int.class, (short) 52); in testConstant()
561 value = (int) constant.invoke(); in testConstant()
567 constant = MethodHandles.constant(int.class, (char) 'b'); in testConstant()
568 value = (int) constant.invoke(); in testConstant()
574 constant = MethodHandles.constant(int.class, (byte) 0x1); in testConstant()
575 value = (int) constant.invoke(); in testConstant()
583 MethodHandles.constant(int.class, false); in testConstant()
589 MethodHandles.constant(int.class, 0.1f); in testConstant()
[all …]
/art/test/302-float-conversion/
Dinfo.txt1 Tests whether constant conversions of double values to long values are
3 should not overflow under constant conversions.
/art/tools/dexfuzz/src/dexfuzz/rawdex/formats/
DFormat11n.java53 public void setConst(Instruction insn, long constant) { in setConst() argument
54 insn.vregB = constant; in setConst()
DFormat31i.java54 public void setConst(Instruction insn, long constant) { in setConst() argument
55 insn.vregB = constant; in setConst()
DFormat21s.java54 public void setConst(Instruction insn, long constant) { in setConst() argument
55 insn.vregB = constant; in setConst()
DFormat21h.java54 public void setConst(Instruction insn, long constant) { in setConst() argument
55 insn.vregB = constant; in setConst()
DFormat22s.java54 public void setConst(Instruction insn, long constant) { in setConst() argument
55 insn.vregC = constant; in setConst()
DFormat22b.java55 public void setConst(Instruction insn, long constant) { in setConst() argument
56 insn.vregC = constant; in setConst()
DFormat51l.java57 public void setConst(Instruction insn, long constant) { in setConst() argument
58 insn.vregB = constant; in setConst()
DContainsConst.java29 public void setConst(Instruction insn, long constant); in setConst() argument
/art/test/442-checker-constant-folding/
Dinfo.txt1 Tests constant folding in the optimizing compiler.
/art/test/685-shifts/
Dinfo.txt1 Tests for the compiler when shift instructions have 0 or 1 as constant shifts.
/art/test/475-simplify-mul-zero/
Dinfo.txt2 Mul should expect zero constant as input.
/art/test/614-checker-dump-constant-location/
Dinfo.txt1 Test that the graph visualizer outputs useful information for constant
/art/test/646-checker-long-const-to-int/
Dinfo.txt1 Regression test for bogus checks that a constant input of long-to-int conversion fits into int.
/art/test/451-regression-add-float/
Dinfo.txt2 could be now be a constant for floating point numbers.
/art/test/593-checker-long-2-float-regression/
Dinfo.txt2 the long-to-float implementation loading a constant as 64-bit double
/art/test/2022-Invariantloops/
Dinfo.txt1 …ariants. In this case, since the invariants gets used later in the loop constant calculation sinki…

123