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

    <tr>
        <th>Summary</th>
        <td>
            llvm/lib/Target/AArch64/AArch64FastISel.cpp: 2 * possible cut-n-paste error ? 
        </td>
    </tr>

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

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

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

<pre>
    1.

Static analyser cppcheck says:

llvm/lib/Target/AArch64/AArch64FastISel.cpp:1200:34: style: The if condition is the same as the previous if condition [duplicateCondition]

Source code is

  // Canonicalize shift immediate to the RHS.
  if (UseAdd && LHS->hasOneUse() && isValueAvailable(LHS))

Comment mentions RHS, but code doesn't mention it. Suspicious.

2.

llvm/lib/Target/AArch64/AArch64FastISel.cpp:1593:24: style: The if condition is the same as the previous if condition [duplicateCondition]

Source code is

  // Canonicalize shift immediate to the RHS.
  if (LHS->hasOneUse() && isValueAvailable(LHS))

Has someone just cut-n-pasted this code from just above and not changed it ?


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzcVEGPqzYQ_jXDZRQENiThwIGXLUqlJ1Vq3vZu7CF4a2zEmFTpr68g3W72Wu3pScgaMTP-vm8-axSzvXqiGspvUL4kaolDmGujO5kXSRfMvc5TyF4gax7nJapoNSqv3J1pRj1NeiD9J7K6M8jmuda52wiidbYD0f5Q85UiiLZpZj3si4-oVRx_vZBL9TSBbHKRZSAbWYBskOPd0Rr8GAhtjzp4Y6MNHi1jHAhZjYTqEU8z3WxY-HMhlN_MMjmrVaTT-18oXz6pCsusCXUwhJafM4ggWhAtnpQP3mrl7N-EPNg-oh1HMlZFwhg2Ar-fL-l7m-0RxPGVqTEGQexB7PH7-bID-cug-DdPr0wgjiCq96zlP5RbqLkp61Tn1uz38wVEtX5PlE5hHMlHXA8bPK-wIE7YLfGhwARiD-LwXwnamOJl4cnqdT6fDBXpF1hWVhJkI34Ky77GpLNi5DBS8IRvC0fUS9z53aQ4ksE4WH5Q7-cwPgpUF26Eyhv0IaIelL-SQRsRZPt8c2JqaSpZqYTq_JDtC5kdpUyGusylOFZ9nueZ3mdK5rncF2UpCnWUfX_IEluLTBRZLo5rRylTRUaLoxZ9mVcy3xsoMhqVden6DNIwXxPLvFB9qA6ySpzqyPG2KYTw9BduSRBiXRxzvfbsuuXKUGTOcuSPW6KNjur_97ZQIIgGp8BsO0fPc0Sa5zCv88FkmV09xDhtO2iz_2rjsHSpDhvov9grx2kOb6RX7E0Ag2g3gf8EAAD__1vojzE">