@Override
		public boolean isSame(Instruction i1, Instruction i2) {
			if (i1 == i2) {
				return true;
			}
			// Checking length and prototype will handle use of length-override
			if (i1.getLength() != i2.getLength()) {
				return false;
			}

			if (!equivalentInstructionPrototypes(i1, i2)) {
				return false;
			}

			if (i1.getFlowOverride() != i2.getFlowOverride()) {
				return false;
			}

			if (!isSameFallthrough(program1, i1, program2, i2)) {
				return false;
			}

			try {
				byte[] bytes1 = i1.getParsedBytes();
				byte[] bytes2 = i2.getParsedBytes();
				if (!Arrays.equals(bytes1, bytes2)) {
					return false; // bytes differ
				}
			}
			catch (MemoryAccessException e) {
				String message =
					"Diff couldn't get the underlying bytes when comparing instructions." +
						" instruction1 is at " + i1.getAddress().toString(true) +
						". instruction2 is at " + i2.getAddress().toString(true) + ".  " +
						e.getMessage();
				Msg.error(this, message, e);
				return false;
			}

			return true;
		}
Provides comparisons between two instruction code units.
Ghidra/Features/Base/src/main/java/ghidra/program/util/ProgramDiff.java