<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/119235>119235</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [GlobalISel] getICmpResultType and getFCmpResultType
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          tschuett
      </td>
    </tr>
</table>

<pre>
    TargetLowering has 
```
/// Return the ValueType of the result of SETCC operations.
  virtual EVT getSetCCResultType(const DataLayout &DL, LLVMContext &Context,
 EVT VT) const;
```

Should we add similar hooks to target lowering?
Add virtual = 0 functions to LegalizerInfo and every target has to implement them?

I looked through the internals of LegalizerInfo, but *I* failed to sneak out the result types.

[SelectionDAG] Expand [US]CMP using arithmetic on boolean values instead of selects
https://github.com/llvm/llvm-project/pull/98774

relies on the result type of setccs.

Alternvatives?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUk8-OozgQxp_GXEobOeZPOgcONOmMImWk1STbdwMFeNvYyC6nJ_v0K7vTOztzG6kkoFB9_upXLum9mgxizcpnVh4yGWi2ribfzwGJss4O9_oq3YR0tu_olJlglh4Yb1jFH8EbJo4fAd-QgjNAM8Kr1AGv9xXBjinh0AdN8evycm1bsCs6Scoav2G8AbgpR0FqeHm9woR0QWrbb6kmqjDx1FvjCQ6S5FnebSBgojqcmWjhfH792lpD-D0lH69MtFE46r1emdhDEmD586_2eXOZbdADvCPIYQCvFqWlg9naNw9kgRIC0A8GLD8y3jTD8J9nlh-AwxhMnxqKNWecpFb_oDuZ0YI0A-AN3f1TK2IkC2pZNS5oKCJaPoQZb06grX3DAWh2NkxzAqgMoTNS-8jwJ_nIoEtAmhMTDYxS6VhswRuUbxBh_W8EdF8xQY9RPl9QY_J9aL6w8gAv39dol5XPf11YeWi__gnBx9FLp2hekFQP1kBnrUZp4BYH7UEZTyiH6M0nQc94MxOtnuWPGzIpmkO36e3CxFHr2-fjj9XZv7EnJo5r0JqJ4_5ptys-DDrUCn088JcOPk6ivv9spdGRz02SuqFn-TEb6nzY53uZYb3d5fmuKisusrku831VjcV2K4uqwCfMS-zGLZYl31V5VXSZqgUXxVbwfawTYlOM2_1QjTuUPB85l6zguEilN9H-xropU94HrLfbvcjLTMsOtU9bJYTBd0h_mRBxyVydeu7C5FnBtfLkf8iQIp3W8Yu2ndSnC-o4kgnp1C7rj3VIF2pCOv6UzYLT9W8zT-Y8E8eH-1st_g0AAP__47tYNA">