Check fail can be triggered in `tf.raw_ops.Empty` under jit compile mode.
Hi @Lyutoon ,

Please report check fails and other vulnerabilities [here](https://bughunters.google.com/). For more details, please check https://github.com/tensorflow/tensorflow/blob/master/SECURITY.md and follow the instrcutions.

I have replicated the reported behaviour with tf-nightly(2.14.0-dev20230601) in colab and attached screenshot below.Check fail observed with `jit_compile=True` and `without jit compile` an exception is raised.


<img width="1496" alt="Screenshot 2023-06-02 at 11 41 37 AM" src="https://github.com/tensorflow/tensorflow/assets/116063290/58eae1c8-d933-45ec-b17b-edefa34f9309">



<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Bug

### Have you reproduced the bug with TF nightly?

Yes

### Source

source

### Tensorflow Version

2.14.0

### Custom Code

Yes

### OS Platform and Distribution

Ubuntu 20.04

### Mobile device

Ubuntu 20.04

### Python version

3.8.10

### Bazel version

_No response_

### GCC/Compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current Behaviour?

Check fail can be triggered in `tf.raw_ops.Empty` under jit compile mode. While in normal mode, it won't be triggered but through an InvalidArgumentError.

### Standalone code to reproduce the issue

```shell
import os 
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
import tensorflow as tf
import numpy as np

shape=tf.random.uniform([4], dtype=tf.dtypes.int32, minval=0, maxval=1000000)
dtype=tf.dtypes.int32
init=True

@tf.function(jit_compile=True)
def fuzz_jit():
    y = tf.raw_ops.Empty(shape=shape, dtype=dtype, init=init)
    return y

def fuzz_normal():
    y = tf.raw_ops.Empty(shape=shape, dtype=dtype, init=init)
    return y

y1 = fuzz_jit() # trigger check fail
print('[+] JIT ok')
y2 = fuzz_normal()
print('[+] Normal ok')
```


### Relevant log output

```shell
% python test.py
2023-06-02 11:44:08.858309: F tensorflow/compiler/xla/shape_util.cc:288] Check failed: FillNewShape(element_type, dimensions, &shape) 
zsh: abort (core dumped)  python test.py
```
</details>