Skip to content
  1. Oct 25, 2021
  2. Oct 24, 2021
    • Philip Reames's avatar
      Treat branch on poison as immediate UB (under an off by default flag) · a461fa64
      Philip Reames authored
      The LangRef clearly states that branching on a undef or poison value is immediate undefined behavior, but historically, we have not been consistent about implementing that interpretation in the optimizer. Historically, we used (in some cases) a more relaxed model which essentially looked for provable UB along both paths which was control dependent on the condition. However, we've never been 100% consistent here. For instance SCEV uses the strong model for increments which form AddRecs (and only addrecs).
      
      At the moment, the last big blocker for finally making this switch is enabling the fix landed in D106041. Loop unswitching (in it's classic form) is incorrect as it creates many "branch on poisons" when unswitching conditions originally unreachable within the loop.
      
      This change adds a flag to value tracking which allows to easily test the optimization potential of treating branch on poison as immediate UB. It's intended to help ease work on getting us finally through this transition and avoid multiple independent rediscovers of the same issues.
      
      Differential Revision: https://reviews.llvm.org/D112026
      a461fa64
    • Philip Reames's avatar
      [instcombine] Fix oss-fuzz 39934 (mul matcher can match non-instruction) · 3c06ecaa
      Philip Reames authored
      Fixes a crash observed by oss-fuzz in 39934.  Issue at hand is that code expects a pattern match on m_Mul to imply the operand is a mul instruction, however mul constexprs are also valid here.
      3c06ecaa
    • Fangrui Song's avatar
      [ARC] Fix -Wunused-variable. NFC · 54405a49
      Fangrui Song authored
      54405a49
    • Kazu Hirata's avatar
      [llvm] Call *(Set|Map)::erase directly (NFC) · 1c35973c
      Kazu Hirata authored
      We can erase an item in a set or map without checking its membership
      first.
      1c35973c
  3. Oct 23, 2021
Loading